ghep_dump.C
Go to the documentation of this file.
1 //
2 // Prints the events in the input GHEP event file
3 //
4 // Usage:
5 // shell% genie
6 // genie[0] .x ghep_dump.C("/path/to/my/genie_file.root");
7 //
8 // Costas Andreopoulos, Dec 13, 2006
9 //
10 
11 void ghep_dump(const char * filename)
12 {
13 
14  // open the ROOT file and get the event TTree
15  TFile inpfile(filename,"READ");
16  TTree * tree = dynamic_cast <TTree *> (inpfile.Get("gtree"));
17 
18  // set the branch address
19  genie::NtpMCEventRecord * mcrec = 0;
20  tree->SetBranchAddress("gmcrec", &mcrec);
21 
22  // loop over event tree
23  for(int i = 0; i< tree->GetEntries(); i++) {
24  tree->GetEntry(i);
25 
26  genie::NtpMCRecHeader rec_header = mcrec->hdr;
27  genie::EventRecord & event = *(mcrec->event);
28 
29  // print-out
30  cout << rec_header;
31  cout << event;
32 
33  mcrec->Clear();
34  }
35 
36  inpfile.Close();
37 }
38 
size_t i(0)
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
void ghep_dump(const char *filename)
Definition: ghep_dump.C:11
the ParameterSet object passed in for the configuration of a destination should be the only source that can affect the behavior of that destination This is to eliminate the dependencies of configuring a destination from multiple mostly from the defaults It suppresses possible glitches about changing the configuration file somewhere outside of a destination segament might still affect the behavior of that destination In the previous configuration for a specific the value of a certain e may come from following and have been suppressed It the configuring ParameterSet object for each destination will be required to carry a parameter list as complete as possible If a parameter still cannot be found in the ParameterSet the configuration code will go look for a hardwired default directly The model is a great simplicity comparing with the previous especially when looking for default values Another great advantage is most of the parameters now have very limited places that allows to appear Usually they can only appear at one certain level in a configuration file For in the old configuring model or in a default ParameterSet object inside of a or in a category or in a severity object This layout of multiple sources for a single parameter brings great confusion in both writing a configuration and in processing the configuration file Under the new the only allowed place for the parameter limit to appear is inside of a category which is inside of a destination object Other improvements simplify the meaning of a destination name In the old a destination name has multiple folds of meanings the e cout and cerr have the special meaning of logging messages to standard output or standard error the name also serves as the output filename if the destination is a file these names are also references to look up for detailed configurations in configuring the MessageFacility The multi purpose of the destination name might cause some unwanted behavior in either writing or parsing the configuration file To amend in the new model the destination name is now merely a name for a which might represent the literal purpose of this or just an id All other meanings of the destinations names now go into the destination ParameterSet as individual such as the type parameter and filename parameter Following is the deatiled rule for the new configuring Everything that is related with MessageFacility configuration must be wrapped in a single ParameterSet object with the name MessageFacility The MessageFacility ParameterSet object contains a series of top level parameters These parameters can be chosen a vector of string listing the name of debug enabled models Or use *to enable debug messages in all modules a vector of string a vector of string a vector of string a ParameterSet object containing the list of all destinations The destinations ParameterSet object is a combination of ParameterSet objects for individual destinations There are two types of destinations that you can insert in the destinations ParameterSet ordinary including cout
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT tree(creating the branches they need) and resize.*The AnalysisTreeDataStruct is const ructed with as many tracking algorithms as *there are named in the module configuration(even if they are not backed by *any available tracking data).*By default const ruction
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
operation and maintenance manual for MessageLogger MessageService General Work Flow of a Message The effect of a user issuing a which has been configured to filter these in some way and to dispatch the messages to one or more destinations This section will outline the steps involved The user code may be running in opne or more each of which might issue messages We will call these the client side In any event
MINOS-style Ntuple Class to hold an MC Event Record Header.