ROOTANA
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Attributes
MyTestLoop Class Reference
Inheritance diagram for MyTestLoop:
Inheritance graph
[legend]
Collaboration diagram for MyTestLoop:
Collaboration graph
[legend]

Public Member Functions

 MyTestLoop ()
 
void AddAllCanvases ()
 User must.
 
virtual ~MyTestLoop ()
 
void BeginRun (int transition, int run, int time)
 
void EndRun (int transition, int run, int time)
 
void ResetHistograms ()
 This method can be implemented by users to plotting of current canvas.
 
void UpdateHistograms (TDataContainer &dataContainer)
 This method can be implemented by users to update user histograms.
 
void PlotCanvas (TDataContainer &dataContainer)
 This method can be implemented by users to plotting of current canvas.
 
 MyTestLoop ()
 
virtual ~MyTestLoop ()
 
void BeginRun (int transition, int run, int time)
 
void EndRun (int transition, int run, int time)
 
bool ProcessMidasEvent (TDataContainer &dataContainer)
 
void Usage (void)
 
bool CheckOption (std::string option)
 
 MyTestLoop ()
 
void AddAllCanvases ()
 User must.
 
virtual ~MyTestLoop ()
 
void ResetHistograms ()
 This method can be implemented by users to plotting of current canvas.
 
void UpdateHistograms (TDataContainer &dataContainer)
 This method can be implemented by users to update user histograms.
 
void PlotCanvas (TDataContainer &dataContainer)
 This method can be implemented by users to plotting of current canvas.
 
- Public Member Functions inherited from TRootanaDisplay
 TRootanaDisplay ()
 
virtual ~TRootanaDisplay ()
 
void AddSingleCanvas (std::string name, std::string subtab_name=std::string(""))
 Add a new canvas; user will interactively fill it.
 
void AddSingleCanvas (TCanvasHandleBase *handleClass, std::string subtab_name=std::string(""))
 
TMainDisplayWindowGetDisplayWindow ()
 
void NextButtonPushed ()
 Method for when next button is pushed.
 
void NextInterestingButtonPushed ()
 Method for when next interesting button is pushed.
 
void EventSkipButtonPushed ()
 Method for when skip event button is pushed (online mode)
 
void Reset ()
 
void UpdatePlotsAction ()
 
void QuitButtonAction ()
 Method to call when 'quit' button is pressed.
 
void SetNumberSkipEvent (int number)
 
void SetSecondsBeforeUpdating (double SecondsBeforeUpdating)
 Function so that user can skip how many seconds to wait in free-running mode.
 
void SetOnlineUpdatingBasedSeconds (bool updateBasedSeconds=true)
 
std::string GetDisplayName ()
 Get Display name.
 
void SetDisplayName (std::string name)
 Set Display name.
 
void InitializeRAD ()
 Special version of Init method, to be used only by TRootanaDisplay.
 
bool CheckOptionRAD (std::string option)
 
void UsageRAD ()
 Also a special version of usage for TRootanaDisplay. See CheckOptionRAD.
 
- Public Member Functions inherited from TRootanaEventLoop
virtual ~TRootanaEventLoop ()
 
TDataContainerGetDataContainer ()
 Method to get the data container that event loop owns.
 
virtual void Initialize (void)
 
virtual void Finalize ()
 
virtual bool PreFilter (TDataContainer &dataContainer)
 
bool IsOnline () const
 Are we processing online data?
 
bool IsOffline () const
 Are we processing offline data?
 
int GetCurrentRunNumber () const
 Current Run Number.
 
void SetCurrentRunNumber (int run)
 Current Run Number.
 
int ExecuteLoop (int argc, char *argv[])
 Method to actually process the Midas information, either as file or online.
 
int ProcessMidasFile (TApplication *app, const char *fname)
 
int ProcessMidasOnline (TApplication *app, const char *hostname, const char *exptname)
 
void DisableAutoMainWindow ()
 Disable automatic creation of MainWindow.
 
void UseBatchMode ()
 Use a batch mode, where we don't check ROOT status.
 
MVOdbGetODB ()
 Get pointer to ODB variables.
 
void OpenRootFile (int run, std::string midasFilename=std::string(""))
 Open output ROOT file.
 
void CloseRootFile ()
 Cloe output ROOT file.
 
bool IsRootFileValid ()
 Check if output ROOT file is valid and open.
 
void DisableRootOutput (bool disable=true)
 
int IsRootOutputEnabled ()
 
void SetOutputFilename (std::string name)
 
virtual std::string SetFullOutputFileName (int run, std::string midasFilename)
 
void SetOnlineName (std::string name)
 
void ProcessThisEventID (int eventID)
 
bool CheckEventID (int eventId)
 Little helper method to check if EventID matchs requested EventID list.
 
void SuppressTimestampWarnings ()
 
bool GetSuppressTimestampWarnings ()
 Suppress timestamp warnings? true = suppress warnings.
 
void UseOnlyRecent (bool setting=true)
 
void SetTHttpServerReadWrite (bool readwrite=true)
 

Data Fields

TAnaManageranaManager
 

Private Attributes

int nnn
 
TH1FsizeBankFR10
 

Additional Inherited Members

- Static Public Member Functions inherited from TRootanaEventLoop
static TRootanaEventLoopGet (void)
 
template<typename T >
static void CreateSingleton ()
 
- Protected Member Functions inherited from TRootanaEventLoop
bool CreateOutputFile (std::string name, std::string options="RECREATE")
 
 TRootanaEventLoop ()
 
- Protected Attributes inherited from TRootanaEventLoop
TDirectoryfOnlineHistDir
 TDirectory for online histograms.
 
- Static Protected Attributes inherited from TRootanaEventLoop
static TRootanaEventLoopfTRootanaEventLoop = NULL
 The static pointer to the singleton instance.
 

Detailed Description

This is an example of the a user defined event display. The user then needs to define how they what to update and plot histograms. The updating of histograms happens for each event. In online mode, the plotting of histograms only happens for each XX events; for offline mode the plotting happens for each event.

There are two ways that users can decide to update and plot histograms:

1) They can create histograms in their event display class and then fill the methods UpdateHistograms(TMidasEvent*) and PlotCanvas(TMidasEvent*). This histograms can then file in the canvases that are added using AddSingleCanvas(std::string name).

In this example this method is used for the histogram sizeBankFR10, which is just a histogram of the size of the bank called "FR10".

2) They can create classes that are derived from TCanvasHandleBase. The derived classes are then added using the method AddSingleCanvas(TCanvasHandleBase* handleClass). In this example there are two classes derived from TCanvasHandleBase: a) TSimpleExampleCanvas: this class just creates a tab/canvas with a histogram of the size of the bank called "FR11". a) TComplicatedExampleCanvas: this class creates a set of four different canvases/histograms which the user can select using a ROOT number widget.

The actual ROOT GUI is encapsulated in a separate class TMainDisplayWindow. The TRootanaDisplay has an instance of this TMainDisplayWindow class. Users will be need to access the TMainDisplayWindow by calling

TRootanaDisplay::GetDisplayWindow()

in order to grab the particular canvas that we want plot on.

Definition at line 15 of file anaDisplay.cxx.

Constructor & Destructor Documentation

◆ MyTestLoop() [1/3]

MyTestLoop::MyTestLoop ( )
inline

Definition at line 23 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ ~MyTestLoop() [1/3]

virtual MyTestLoop::~MyTestLoop ( )
inlinevirtual

Definition at line 52 of file anaDisplay.cxx.

◆ MyTestLoop() [2/3]

MyTestLoop::MyTestLoop ( )
inline

Definition at line 19 of file analyzer_example.cxx.

◆ ~MyTestLoop() [2/3]

virtual MyTestLoop::~MyTestLoop ( )
inlinevirtual

Definition at line 23 of file analyzer_example.cxx.

◆ MyTestLoop() [3/3]

MyTestLoop::MyTestLoop ( )
inline

Definition at line 48 of file display_example.cxx.

Here is the call graph for this function:

◆ ~MyTestLoop() [3/3]

virtual MyTestLoop::~MyTestLoop ( )
inlinevirtual

Definition at line 63 of file display_example.cxx.

Member Function Documentation

◆ AddAllCanvases() [1/2]

void MyTestLoop::AddAllCanvases ( )
inlinevirtual

User must.

Implements TRootanaDisplay.

Definition at line 35 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ AddAllCanvases() [2/2]

void MyTestLoop::AddAllCanvases ( )
inlinevirtual

User must.

Implements TRootanaDisplay.

Definition at line 54 of file display_example.cxx.

Here is the call graph for this function:

◆ BeginRun() [1/2]

void MyTestLoop::BeginRun ( int  transition,
int  run,
int  time 
)
inlinevirtual

Called before the first event of a file is read, but you should prefer Initialize() for general initialization. This method will be called once for each input file.

Reimplemented from TRootanaEventLoop.

Definition at line 54 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ BeginRun() [2/2]

void MyTestLoop::BeginRun ( int  transition,
int  run,
int  time 
)
inlinevirtual

Called before the first event of a file is read, but you should prefer Initialize() for general initialization. This method will be called once for each input file.

Reimplemented from TRootanaEventLoop.

Definition at line 25 of file analyzer_example.cxx.

Here is the call graph for this function:

◆ CheckOption()

bool MyTestLoop::CheckOption ( std::string  option)
inlinevirtual

Check an option and return true if it is valid.
The return value is used to flag errors during option handling. If the options are valid, then CheckOption should return true to indicate success. If there is a problem processing the options, then CheckOption should return false. If this returns false, then the event loop will print the Usage message and exit with a non zero value (i.e. indicate failure).

Reimplemented from TRootanaEventLoop.

Definition at line 89 of file analyzer_example.cxx.

Here is the call graph for this function:

◆ EndRun() [1/2]

void MyTestLoop::EndRun ( int  transition,
int  run,
int  time 
)
inlinevirtual

Called after the last event of a file is read, but you should prefer Finalize() for general finalization. This method will be called once for each input file.

Reimplemented from TRootanaEventLoop.

Definition at line 60 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ EndRun() [2/2]

void MyTestLoop::EndRun ( int  transition,
int  run,
int  time 
)
inlinevirtual

Called after the last event of a file is read, but you should prefer Finalize() for general finalization. This method will be called once for each input file.

Reimplemented from TRootanaEventLoop.

Definition at line 29 of file analyzer_example.cxx.

Here is the call graph for this function:

◆ PlotCanvas() [1/2]

void MyTestLoop::PlotCanvas ( TDataContainer dataContainer)
inlinevirtual

This method can be implemented by users to plotting of current canvas.

Reimplemented from TRootanaDisplay.

Definition at line 72 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ PlotCanvas() [2/2]

void MyTestLoop::PlotCanvas ( TDataContainer dataContainer)
inlinevirtual

This method can be implemented by users to plotting of current canvas.

Reimplemented from TRootanaDisplay.

Definition at line 78 of file display_example.cxx.

Here is the call graph for this function:

◆ ProcessMidasEvent()

bool MyTestLoop::ProcessMidasEvent ( TDataContainer dataContainer)
inlinevirtual

The main method, called for each event. Users must implement this function!

Implements TRootanaEventLoop.

Definition at line 33 of file analyzer_example.cxx.

Here is the call graph for this function:

◆ ResetHistograms() [1/2]

void MyTestLoop::ResetHistograms ( )
inlinevirtual

This method can be implemented by users to plotting of current canvas.

Reimplemented from TRootanaDisplay.

Definition at line 65 of file anaDisplay.cxx.

◆ ResetHistograms() [2/2]

void MyTestLoop::ResetHistograms ( )
inlinevirtual

This method can be implemented by users to plotting of current canvas.

Reimplemented from TRootanaDisplay.

Definition at line 65 of file display_example.cxx.

◆ UpdateHistograms() [1/2]

void MyTestLoop::UpdateHistograms ( TDataContainer dataContainer)
inlinevirtual

This method can be implemented by users to update user histograms.

Reimplemented from TRootanaDisplay.

Definition at line 67 of file anaDisplay.cxx.

Here is the call graph for this function:

◆ UpdateHistograms() [2/2]

void MyTestLoop::UpdateHistograms ( TDataContainer dataContainer)
inlinevirtual

This method can be implemented by users to update user histograms.

Reimplemented from TRootanaDisplay.

Definition at line 69 of file display_example.cxx.

Here is the call graph for this function:

◆ Usage()

void MyTestLoop::Usage ( void  )
inlinevirtual

Called when there is a usage error. This code should print a usage message and then return.

Reimplemented from TRootanaEventLoop.

Definition at line 84 of file analyzer_example.cxx.

Field Documentation

◆ anaManager

TAnaManager* MyTestLoop::anaManager

Definition at line 21 of file anaDisplay.cxx.

◆ nnn

int MyTestLoop::nnn
private

Definition at line 15 of file analyzer_example.cxx.

◆ sizeBankFR10

TH1F* MyTestLoop::sizeBankFR10
private

Definition at line 45 of file display_example.cxx.


The documentation for this class was generated from the following files: