void EventLoop1() {
  gROOT->Reset();
  gSystem->Load("libFWCoreFWLite.so");

  AutoLibraryLoader::enable();

  //string rootfile = "/castor/cern.ch/cms/store/data/Commissioning08/Cosmics/RECO/v1/000/068/958/001366F1-16A9-DD11-A3DC-001617E30F58.root";
  string rootfile = "/castor/cern.ch/cms/store/data/Commissioning08/Cosmics/RECO/CRAFT_ALL_V4_ReReco-v1/0006/36B24932-4EC3-DD11-8C39-0019B9E5003B.root";
  TFile *f =TFile::Open(rootfile.c_str());
  TTreeFormula* ncluster =  new TTreeFormula("Var1","SiStripClusteredmNewDetSetVector_siStripClusters__Rec.obj.@m_ids.size()",Events);
  TTreeFormula* run =  new TTreeFormula("Var1","EventAuxiliary.id_.run_",Events);
  TTreeFormula* event =  new TTreeFormula("Var1","EventAuxiliary.id_.event_",Events);
  TTreeFormula* cmul =  new TTreeFormula("Var1","SiStripClusteredmNewDetSetVector_siStripClusters__Rec.obj.m_ids.size",Events);
  TTreeFormula* detid =  new TTreeFormula("Var1","SiStripClusteredmNewDetSetVector_siStripClusters__Rec.obj.m_ids.id",Events);
  TTreeFormula* nrechit =  new TTreeFormula("Var1","TrackingRecHitsOwned_ctfWithMaterialTracksP5__Rec.obj.@data_.size()",Events);
  TTreeFormula* recid =  new TTreeFormula("Var1","TrackingRecHitsOwned_ctfWithMaterialTracksP5__Rec.obj.data_.m_id",Events);
  for (int j = 0; j < Events->GetEntries(); j++){
  Events->LoadTree(j);
  nrechit->UpdateFormulaLeaves();
  int nrechits=nrechit->EvalInstance(0);
  if(nrechits>0){
          run->UpdateFormulaLeaves();
          event->UpdateFormulaLeaves();
          ncluster->UpdateFormulaLeaves();
          cmul->UpdateFormulaLeaves();
          detid->UpdateFormulaLeaves();
          recid->UpdateFormulaLeaves();  
          cout << run->EvalInstance(0) << " " << (int)event->EvalInstance(0) << " "<< ncluster->EvalInstance(0) << endl; 
          cout << nrechit->EvalInstance(0) << " " ;
          int nrechits2= recid->GetNdata();  
          if(nrechits!=nrechits2)cout << "********************PROBLEM**********************" << endl; 
          for(int k=0; k < nrechits2; k++){ 
          cout << (int)recid->EvalInstance(k)<< " " ; 
}
          cout << endl;
          detid->GetNdata();
          for(int k=0; k < cmul->GetNdata(); k++){ 
          cout << cmul->EvalInstance(k)<< " "<< (int)detid->EvalInstance(k)<< " " ; 
}
          cout << endl;
}
}
}
