46 Int_t
main(Int_t argc, Char_t* argv[])
126 bool current_from_epics =
false;
138 Double_t current = epics.
GetDataValue(
"qw:qt_mps_i_set");
140 QwMessage <<
"Setting magnetic field current to "
143 current_from_epics =
true;
157 QwError <<
"Error: no magnetic field specified and no EPICS events in range!"
174 event->LoadBeamProperty(
"beam_property.map");
176 if (not enablemapfile) {
178 rootfile->
NewTree(
"event_tree",
"QwTracking Event-based Tree");
179 rootfile->
GetTree(
"event_tree")->Branch(
"events",
"QwEvent", &event);
191 delete event;
event = 0;
212 Double_t current = epics.
GetDataValue(
"qw:qt_mps_i_set");
213 if (current_from_epics && current > 0.0) {
214 QwMessage <<
"Setting magnetic field current to "
260 event->SetEventHeader(header);
270 event->AddHitContainer(hitlist);
273 trackingworker->
ProcessEvent(&tracking_detectors, event);
281 if (hitlist)
delete hitlist; hitlist = 0;
282 if (event)
delete event;
event = 0;
296 QwMessage <<
"Number of good partial tracks: "
306 rootfile->
Write(0, TObject::kOverwrite);
316 if (rootfile)
delete rootfile; rootfile = 0;
323 if (trackingworker)
delete trackingworker; trackingworker = 0;
#define QwMessage
Predefined log drain for regular messages.
static void AppendToSearchPath(const TString &searchdir)
Add a directory to the search path.
Bool_t FillSubsystemConfigurationData(QwSubsystemArray &subsystems)
double GetMagneticFieldCurrent() const
Get the magnetic field current.
Int_t WriteParamFileList(const TString &name, T &object)
void ConstructHistograms(const std::string &name, T &object)
Construct the histograms of a generic object.
TTree * GetTree(const std::string &name)
Get the tree with name.
Double_t GetDataValue(const string &tag) const
void ProcessOptions(QwOptions &options)
Sets internal flags based on the QwOptions.
Int_t OpenNextStream()
Opens the event stream (file or ET) based on the internal flags.
Contains header information of a tracked event.
Load the options for the tracking subsystems.
static void SetCurrentRunNumber(const UInt_t runnumber)
Set the current run number for looking up the appropriate parameter file.
void ConstructIndices(const std::string &from, const std::string &to, bool reverse=true)
Construct indices from one tree to another tree.
Int_t CloseStream()
Closes a currently open event stream.
Controls all the routines involved in finding tracks in an event.
This is the main executable for the tracking analysis.
#define QwVerbose
Predefined log drain for verbose messages.
void ProcessOptions(QwOptions *options)
Process class options for QwOptions.
void ProcessOptions(QwOptions &options)
Process configuration options (default behavior)
void ProcessEvent(const QwSubsystemArrayTracking *detectors, QwEvent *event)
Process the hit list and construct the event.
Int_t FillTree(const std::string &name)
Fill the tree with name.
void GetHitList(QwHitContainer &hitlist)
T GetValue(const std::string &key)
Get a templated value.
Controls all the routines involved in finding tracks in an event.
Contains a tracked event, i.e. all information from hits to tracks.
void Usage()
Print usage information.
void ListConfigFiles()
List the configuration files.
Virtual base class for the parity subsystems.
A wrapper class for a ROOT file or memory mapped file.
Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
A logfile class, based on an identical class in the Hermes analyzer.
Int_t LoadChannelMap(TString mapfile)
void Parse(bool force=false)
Parse all sources of options.
void ConstructTreeBranches(const std::string &name, const std::string &desc, T &object, const std::string &prefix="")
Construct the tree branches of a generic object.
Int_t GetRunNumber() const
Return CODA file run number.
void SetMagneticFieldCurrent(const double current)
Set the magnetic field current.
void NewTree(const std::string &name, const std::string &desc)
Create a new tree with name and description.
QwHistogramHelper gQwHists
Globally defined instance of the QwHistogramHelper class.
Bool_t FillSubsystemData(QwSubsystemArray &subsystems)
Bool_t HasDataLoaded() const
const QwGeometry GetGeometry()
Get the detector info for all detectors.
int ngood
number of good events
static std::ostream & endl(std::ostream &)
End of the line.
void FillTreeBranches(const std::string &name, const T &object)
Fill the tree branches of a generic object by tree name.
void ProcessEvent()
Process the decoded data in this event.
const std::string getenv_safe_string(const char *name)
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
void FillHistograms(T &object)
Fill histograms of the subsystem array.
TString GetRunLabel() const
Returns a string like <run#> or <run#>.<file#>
Bool_t FillEPICSData(QwEPICSEvent &epics)
void PrintTrees() const
Print registered trees.
int main(int argc, char **argv)
void DefineOptionsTracking(QwOptions &options)
void CalculateRunningValues()
void LoadHistParamsFromFile(const std::string &filename)
void PrintDirs() const
Print registered histogram directories.
Bool_t IsROCConfigurationEvent()
#define QwError
Predefined log drain for errors.
void SetCommandLine(int argc, char *argv[], bool default_config_file=true)
Set the command line arguments.
void FillHardwareErrorSummary()