NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
IceRootx Class Reference

Job for conversion of simple Root data into IceEvent data structures. More...

#include "IceRootx.h"

Inheritance diagram for IceRootx:
NcJob

Detailed Description

Job for conversion of simple Root data into IceEvent data structures.

Copyright(c) 2003, IceCube Experiment at the South Pole. All rights reserved.
Author: The IceCube NCFS-based Offline Project.
Contributors are mentioned in the code where appropriate.
Permission to use, copy, modify and distribute this software and its
documentation strictly for non-commercial purposes is hereby granted
without fee, provided that the above copyright notice appears in all
copies and that both the copyright notice and this permission notice
appear in the supporting documentation.
The authors make no claims about the suitability of this software for
any purpose. It is provided "as is" without express or implied warranty.
// Class IceRootx
// Conversion of simple Root data into IceEvent data structures.
// This class reads data from the simple Root files as output by the
// original version of Martijn Duvoort's Walnut analyser.
// This class is only retained for backward compatibility. For output from
// newer versions of the Walnut analyser, use IceRoot.
// An indication of the active DAQ system is available in the IceEvent structure
// via a device named "Daq". Here the various daq systems (TWR, Muon, ...)
// from which the actual hits (ADC, LE, TOT) eventually will be composed
// are indicated as "signals" of the device itself.
// This class is derived from NcJob providing a task-based processing
// structure on an event-by-event basis.
// The main object in the job environment is an IceEvent* pointer.
// In case the user has provided sub-tasks, these will be executed
// on an event-by-event basis after the IceEvent structure has been filled
// with the simple Root data and before the final structures are written out.
// Note that the data structures are only written out if an outputfile has
// been specified via the SetOutputFile memberfunction.
// In case no outputfile has been specified, this class provides a facility
// to investigate/analyse simple Root data using the Ralice/IcePack analysis tools.
//
// Usage example :
// ---------------
//
// gSystem->Load("ncfspack");
// gSystem->Load("icepack");
// gSystem->Load("iceconvert");
//
// IceRootx q("IceRootx","Simple Root data to IcePack data structure conversion");
//
// // Limit the number of entries for testing
// q.SetMaxEvents(10);
//
// // Print frequency to produce a short summary print every printfreq events
// q.SetPrintFreq(1);
//
// // The simple Root data input filename(s)
// q.AddInputFile("test-i3.root");
//
// // Output file for the event structures
// q.SetOutputFile("events.root");
//
// ///////////////////////////////////////////////////////////////////
// // Here the user can specify his/her sub-tasks to be executed
// // on an event-by-event basis after the IceEvent structure
// // has been filled and before the data is written out.
// // Sub-tasks (i.e. a user classes derived from TTask) are entered
// // as follows :
// //
// // MyXtalk task1("task1","Cross talk correction");
// // MyClean task2("task2","Hit cleaning");
// // q.Add(&task1);
// // q.Add(&task2);
// //
// // The sub-tasks will be executed in the order as they are entered.
// ///////////////////////////////////////////////////////////////////
//
// // Perform the conversion and execute subtasks (if any)
// // on an event-by-event basis
// q.ExecuteJob();
//
//--- Author: Garmt de Vries-Uiterweerd 13-Mar-2007 Utrecht University
//- Modified: NvE $Date: 2010-03-19 11:10:02 +0100 (Fri, 19 Mar 2010) $ NCFS

Definition at line 22 of file IceRootx.h.

Public Member Functions

 IceRootx (const char *name="IceRootx", const char *title="")
 
virtual ~IceRootx ()
 
void AddInputFile (TString name)
 
virtual void Exec (Option_t *opt)
 
TFile * GetOutputFile ()
 
void SetBufferSize (Int_t bsize)
 
void SetMaxEvents (Int_t n)
 
void SetOutputFile (TFile *ofile)
 
void SetOutputFile (TString name)
 
void SetPrintFreq (Int_t f)
 
void SetSplitLevel (Int_t split)
 
- Public Member Functions inherited from NcJob
 NcJob (const char *name="NcJob", const char *title="")
 
virtual ~NcJob ()
 
void AddObject (TObject *obj)
 
void AddObjects (TObjArray *arr)
 
void ExecuteJob (Int_t mode=0)
 
TFolder * GetFolder () const
 
TObject * GetMainObject () const
 
TObject * GetObject (const char *classname) const
 
TObject * GetObject (Int_t j) const
 
TObjArray * GetObjects () const
 
TObjArray * GetObjects (const char *classname)
 
void ListEnvironment ()
 
void MakeFolder ()
 
void ProcessObject (TObject *obj)
 
void RemoveObject (TObject *obj)
 
void RemoveObjects (const char *classname)
 

Protected Attributes

Int_t fBsize
 
TObjArray * fInfiles
 
Int_t fMaxevt
 
TFile * fOutfile
 
Int_t fPrintfreq
 
Int_t fSplit
 
TTree * fTree
 
- Protected Attributes inherited from NcJob
TFolder * fFolder
 
TObject * fMainObject
 
Int_t fMakefolder
 
TObjArray * fObjects
 
TObjArray * fSelect
 ! Temp. array of pointers to user-selected stored objects
 

Additional Inherited Members

- Protected Member Functions inherited from NcJob
void SetMainObject (TObject *obj)
 

Constructor & Destructor Documentation

◆ IceRootx()

IceRootx::IceRootx ( const char * name = "IceRootx",
const char * title = "" )
// Default constructor.
// By default maxevent=-1, split=0, bsize=32000, printfreq=1.

Definition at line 93 of file IceRootx.cxx.

◆ ~IceRootx()

IceRootx::~IceRootx ( )
virtual
// Default destructor.

Definition at line 110 of file IceRootx.cxx.

Member Function Documentation

◆ AddInputFile()

void IceRootx::AddInputFile ( TString name)
// Add the name of this simple Root data input file to the list to be processed.

Definition at line 174 of file IceRootx.cxx.

◆ Exec()

void IceRootx::Exec ( Option_t * opt)
virtual
// Job to loop over the specified number of events and convert the
// simple Root data into the IceEvent structure.
// If maxevents<0 (default) all the entries of the input file
// will be processed.
// Every "printfreq" events a short event summary will be printed.
// The default value is printfreq=1.
// The output will be written on a standard output tree named "T".
//
// Notes :
// -------
// 1) This class is derived from NcJob, allowing a task based processing.
// After the conversion of a simple Root data event into an IceEvent structure,
// the processing of all available sub-tasks (if any) is invoked.
// This provides an event-by-event (sub)task processing before the
// final data structures are written out.
// 2) The main object in this job environment is an IceEvent* pointer.

Definition at line 228 of file IceRootx.cxx.

◆ GetOutputFile()

TFile * IceRootx::GetOutputFile ( )
// Provide pointer to the ROOT output file.

Definition at line 217 of file IceRootx.cxx.

◆ SetBufferSize()

void IceRootx::SetBufferSize ( Int_t bsize)
// Set the buffer size for the ROOT data file.
// bsize=32000 is the default initialisation in the constructor.

Definition at line 162 of file IceRootx.cxx.

◆ SetMaxEvents()

void IceRootx::SetMaxEvents ( Int_t n)
// Set the maximum number of events to be processed.
// n=-1 implies processing of the complete input file, which is the default
// initialisation in the constructor.

Definition at line 125 of file IceRootx.cxx.

◆ SetOutputFile() [1/2]

void IceRootx::SetOutputFile ( TFile * ofile)
// Set the output file for the ROOT data.

Definition at line 193 of file IceRootx.cxx.

◆ SetOutputFile() [2/2]

void IceRootx::SetOutputFile ( TString name)
// Create the output file for the ROOT data.

Definition at line 205 of file IceRootx.cxx.

◆ SetPrintFreq()

void IceRootx::SetPrintFreq ( Int_t f)
// Set the printfrequency to produce info every f events.
// f=1 is the default initialisation in the constructor.

Definition at line 138 of file IceRootx.cxx.

◆ SetSplitLevel()

void IceRootx::SetSplitLevel ( Int_t split)
// Set the split level for the ROOT data file.
// split=0 is the default initialisation in the constructor.

Definition at line 150 of file IceRootx.cxx.

Member Data Documentation

◆ fBsize

Int_t IceRootx::fBsize
protected

Definition at line 39 of file IceRootx.h.

◆ fInfiles

TObjArray* IceRootx::fInfiles
protected

Definition at line 42 of file IceRootx.h.

◆ fMaxevt

Int_t IceRootx::fMaxevt
protected

Definition at line 40 of file IceRootx.h.

◆ fOutfile

TFile* IceRootx::fOutfile
protected

Definition at line 43 of file IceRootx.h.

◆ fPrintfreq

Int_t IceRootx::fPrintfreq
protected

Definition at line 41 of file IceRootx.h.

◆ fSplit

Int_t IceRootx::fSplit
protected

Definition at line 38 of file IceRootx.h.

◆ fTree

TTree* IceRootx::fTree
protected

Definition at line 45 of file IceRootx.h.


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