133     JParser<> zap(
"Example program to select events from DST files.");
 
  136     zap[
'n'] = 
make_field(numberOfEvents)       = JLimit::max();
 
  138                           "<run>  <frame index>  <trigger counter>"\
 
  139                           " (one header line)") = 
"";
 
  145   catch(
const exception &error) {
 
  146     FATAL(error.what() << endl);
 
  149   gErrorIgnoreLevel = kFatal;
 
  155   if (selectFile != 
"") {
 
  157     ifstream in(selectFile.c_str());
 
  159     in.ignore(numeric_limits<streamsize>::max(), 
'\n');
 
  161     for (
JTag tag; in >> tag; ) {
 
  162       selection.insert(tag);
 
  168   TFile* out = TFile::Open(
outputFile.c_str(), 
"CREATE");
 
  170   if (out == NULL || ! out->IsOpen()) {
 
  179     TFile* in = TFile::Open(file_name->c_str(), 
"EXISTS");
 
  181     if (in != NULL && in->IsOpen()) {
 
  183       TIter iter(in->GetListOfKeys(), kIterBackward);
 
  185       for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
 
  187         TKey* p = 
dynamic_cast<TKey*
>(in->GetListOfKeys()->Before(key));
 
  189         if (p == NULL || strcmp(key->GetName(), p->GetName()) != 0) {                     
 
  191           TTree* t1 = 
dynamic_cast<TTree*
>(key->ReadObj());
 
  199               if (strcmp((*i)->GetName(), t1->GetName()) == 0) {
 
  208               input.push_back(q = 
new TChain(t1->GetName()));
 
  211             q->Add(file_name->c_str());
 
  244     if (tm->GetEntries() == (*i)->GetEntries())
 
  253     output.push_back((*i)->GetTree()->CloneTree(0));
 
  258     STATUS(
"event: " << setw(10) << i << 
'\r'); 
DEBUG(endl);
 
  264     DEBUG(
"tag " << tag << 
' ' << (selection.empty() || selection.count(tag)) << endl);
 
  266     if (selection.empty() || selection.count(tag)) {
 
  268       for (
size_t m = 0; m != input.size(); ++m) {
 
  269         input [m]->GetEntry(i);
 
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
static JGlob getFilenames
Function object to get list of files for given pattern.
 
static const char *const TTREE_OFFLINE_EVENT
ROOT TTree name.
 
static const char *const TBRANCH_OFFLINE_EVENT
ROOT TBranch name.
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
int frame_index
from the raw data
 
int run_id
DAQ run identifier.
 
ULong64_t trigger_counter
trigger counter
 
Auxiliary class for defining the range of iterations of objects.