Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions include/MGUIOptionsRevan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* MGUIOptionsRevan.h
*
* Copyright (C) by Andreas Zoglauer.
* All rights reserved.
*
* Please see the source-file for the copyright-notice.
*
*/


#ifndef __MGUIOptionsRevan__
#define __MGUIOptionsRevan__


////////////////////////////////////////////////////////////////////////////////


// ROOT libs:
#include <TROOT.h>
#include <TVirtualX.h>
#include <TGWindow.h>
#include <TObjArray.h>
#include <TGFrame.h>
#include <TGButton.h>
#include <TGClient.h>

// MEGAlib libs:
#include "MGlobal.h"
#include "MString.h"
#include "MGUIEEntry.h"
#include "MGUIEFileSelector.h"
#include "MGUIERBList.h"
#include "MGUIOptions.h"

// Nuclearizer libs:
#include "MModule.h"


// Forward declarations:


////////////////////////////////////////////////////////////////////////////////


class MGUIOptionsRevan : public MGUIOptions
{
// public Session:
public:
//! Default constructor
MGUIOptionsRevan(MModule* Module);
//! Default destructor
virtual ~MGUIOptionsRevan();

//! Process all button, etc. messages
virtual bool ProcessMessage(long Message, long Parameter1, long Parameter2);

//! The creation part which gets overwritten
virtual void Create();

// protected methods:
protected:

//! Actions after the Apply or OK button has been pressed
virtual bool OnApply();


// protected members:
protected:

// private members:
private:
//! Select the revan configuration file
MGUIEFileSelector* m_RevanCfgFileSelector;


#ifdef ___CLING___
public:
ClassDef(MGUIOptionsRevan, 1) // basic class for dialog windows
#endif

};

#endif


////////////////////////////////////////////////////////////////////////////////
6 changes: 3 additions & 3 deletions include/MModuleEventSaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ class MModuleEventSaver : public MModule
static const unsigned int c_RoaFile = 0;
static const unsigned int c_DatFile = 1;
static const unsigned int c_EvtaFile = 2;
static const unsigned int c_SimFile = 3;
static const unsigned int c_TraFile = 4;
static const unsigned int c_TraFile = 3;
static const unsigned int c_SimFile = 4;

// protected methods:
protected:
//! Start a new sub-file
Expand Down
111 changes: 111 additions & 0 deletions include/MModuleRevan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* MModuleRevan.h
*
* Copyright (C) by Andreas Zoglauer.
* All rights reserved.
*
* Please see the source-file for the copyright-notice.
*
*/


#ifndef __MModuleRevan__
#define __MModuleRevan__


////////////////////////////////////////////////////////////////////////////////


// Standard libs:
#include <fstream>
using namespace std;

// ROOT libs:

// MEGAlib libs:
#include "MGlobal.h"
#include "MString.h"
#include "MFile.h"
#include "MSettingsRevan.h"
#include "MGeometryRevan.h"
#include "MRawEventAnalyzer.h"

// Nuclearizer libs:
#include "MModule.h"

// Forward declarations:


////////////////////////////////////////////////////////////////////////////////


class MModuleRevan : public MModule
{
// public interface:
public:
//! Default constructor
MModuleRevan();
//! Default destructor
virtual ~MModuleRevan();

//! Create a new object of this class
virtual MModuleRevan* Clone() { return new MModuleRevan(); }

//! Get the revan configuration file name
MString GetRevanConfigurationFileName() const { return m_RevanConfigurationFileName; }
//! Set the revan configuration file name
void SetRevanConfigurationFileName(MString RevanConfigurationFileName) { m_RevanConfigurationFileName = RevanConfigurationFileName; }

//! Initialize the module
virtual bool Initialize();

//! Finalize the module
virtual void Finalize();

//! Main data analysis routine, which updates the event to a new level
virtual bool AnalyzeEvent(MReadOutAssembly* Event);

//! Show the options GUI
virtual void ShowOptionsGUI();

//! Read the configuration data from an XML node
virtual bool ReadXmlConfiguration(MXmlNode* Node);
//! Create an XML node tree from the configuration
virtual MXmlNode* CreateXmlConfiguration();

// protected methods:
protected:


// private methods:
private:

// protected members:
protected:


// private members:
private:
//! The revan configuration file name
MString m_RevanConfigurationFileName;

//! The settings for revan
MSettingsRevan* m_Settings;

//! The revan geometry
MGeometryRevan* m_ReconstructionGeometry;

//! The raw event analyzer
MRawEventAnalyzer* m_RawEventAnalyzer;

#ifdef ___CLING___
public:
ClassDef(MModuleRevan, 0) // no description
#endif

};

#endif


////////////////////////////////////////////////////////////////////////////////
26 changes: 25 additions & 1 deletion include/MReadOutAssembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ class MReadOutAssembly : public MReadOutSequence
//! Get the filgtered-out flag
bool IsFilteredOut() const { return m_FilteredOut; }

//! Set the event-reconstruction-incomplete flag
void SetEventReconstructionIncomplete(bool Flag = true, MString Text = "") { m_EventReconstructionIncomplete = Flag; m_EventReconstructionIncompleteString = Text; }
//! Get the event-reconstruction-incomplete flag
bool IsEventReconstructionIncomplete() const { return m_EventReconstructionIncomplete; }


//! Returns true if any of the "veto" flags have been set
bool IsVeto() const;

Expand All @@ -308,20 +314,30 @@ class MReadOutAssembly : public MReadOutSequence
bool HasAnalysisProgress(uint64_t Progress) const { return (m_AnalysisProgress & Progress) == Progress ? true : false; }
//! Return the analysis progress flag
uint64_t GetAnalysisProgress() const { return m_AnalysisProgress; }

//! Set the Quality of this Event
void SetEventQuality(double EventQuality){ m_EventQuality = EventQuality; }
//!Return the Quality of this Event
double GetEventQuality() const { return m_EventQuality; }

//! Parse some content from a line
bool Parse(MString& Line, int Version = 1);

//! Steam the content in a way Nuclearizer can read it in again
bool StreamDat(ostream& S, int Version = 1);
//! Stream the content in MEGAlib's evta format
void StreamEvta(ostream& S);
//! Stream the content in MEGAlib's evta format
void StreamTra(ostream& S);
//! Stream the content in MEGAlib's roa format
void StreamRoa(ostream& S, bool WithADCs = true, bool WithTACs = true, bool WithEnergies = false, bool WithTimings = false, bool WithTemperatures = false, bool WithFlags = false, bool WithOrigins = false, bool WithNearestNeighbors = false);

//! Steam the BD flags
void StreamBDFlags(ostream& S);

//! Build the next MReadoutAssemply from a .dat file
bool GetNextFromDatFile(MFile &F);

//! Use the info in m_Aspect to turn m_CL into an absolute UTC time
bool ComputeAbsoluteTime();
//! Set the MTime corresponding to absolute UTC time
Expand Down Expand Up @@ -435,26 +451,34 @@ class MReadOutAssembly : public MReadOutSequence
// Flags indicating the quality of the event
bool m_AspectIncomplete;
MString m_AspectIncompleteString;

bool m_TimeIncomplete;
MString m_TimeIncompleteString;

bool m_EnergyCalibrationIncomplete_BadStrip;
MString m_EnergyCalibrationIncomplete_BadStripString;
bool m_EnergyCalibrationIncomplete;
MString m_EnergyCalibrationIncompleteString;

bool m_EnergyResolutionCalibrationIncomplete;
MString m_EnergyResolutionCalibrationIncompleteString;

bool m_StripPairingIncomplete;
MString m_StripPairingIncompleteString;

bool m_LLDEvent;
MString m_LLDEventString;

bool m_DepthCalibrationIncomplete;
MString m_DepthCalibrationIncompleteString;
bool m_DepthCalibration_OutofRange;
MString m_DepthCalibration_OutofRangeString;

bool m_StripHitBelowThreshold;
MString m_StripHitBelowThresholdString;


bool m_EventReconstructionIncomplete;
MString m_EventReconstructionIncompleteString;

//! True if event has been filtered out
bool m_FilteredOut;
Expand Down
2 changes: 2 additions & 0 deletions src/MAssembly.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ using namespace std;
#include "MModuleEventFilter.h"
#include "MModuleEventSaver.h"
#include "MModuleResponseGenerator.h"
#include "MModuleRevan.h"
#include "MModuleTACcut.h"
#include "MModuleNearestNeighbor.h"
#include "MModuleDiagnostics.h"
Expand Down Expand Up @@ -145,6 +146,7 @@ MAssembly::MAssembly()
m_Supervisor->AddAvailableModule(new MModuleEventSaver());
m_Supervisor->AddAvailableModule(new MModuleTransmitterRealta());
m_Supervisor->AddAvailableModule(new MModuleResponseGenerator());
m_Supervisor->AddAvailableModule(new MModuleRevan());
m_Supervisor->AddAvailableModule(new MModuleTACcut());
m_Supervisor->AddAvailableModule(new MModuleNearestNeighbor());

Expand Down
4 changes: 3 additions & 1 deletion src/MGUIOptionsEventSaver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void MGUIOptionsEventSaver::Create()
m_Mode->Add("*.roa file to use with melinator / nulcearizer");
m_Mode->Add("*.dat file containing all information for debugging");
m_Mode->Add("*.evta file to use with revan");
m_Mode->Add("*.tra file to use with mimrec");
m_Mode->SetSelected(dynamic_cast<MModuleEventSaver*>(m_Module)->GetMode());
m_Mode->Create();
TypeFrame->AddFrame(m_Mode, FirstLabelLayout);
Expand All @@ -96,7 +97,8 @@ void MGUIOptionsEventSaver::Create()
dynamic_cast<MModuleEventSaver*>(m_Module)->GetFileName());
m_FileSelector->SetFileType("roa file (read-out assemlies)", "*.roa");
m_FileSelector->SetFileType("dat file (all info)", "*.dat");
m_FileSelector->SetFileType("evta file (evta file)", "*.evta");
m_FileSelector->SetFileType("evta file (not reconstructed events)", "*.evta");
m_FileSelector->SetFileType("tra file (reconstructed events)", "*.tra");
TypeFrame->AddFrame(m_FileSelector, LabelLayout);


Expand Down
Loading