The code I use to access the dataset files is:
python config:
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(XXX)
,
lumisToProcess = cms.untracked.VLuminosityBlockRange('319104:1-319104:10',
'319104:15-319104:185','319124:91-319124:277','319125:1-319125:208','319159:125-319159:618',
'319174:1-319174:77','319175:1-319175:139','319176:1-319176:1803','319177:1-319177:232',
'319190:1-319190:317','319222:108-319222:294','319223:1-319223:131','319254:115-319254:263',
'319255:1-319255:164','319256:1-319256:726','319262:10-319262:10','319262:15-319262:16',
'319262:20-319262:23','319262:29-319262:34','319262:39-319262:40','319262:46-319262:58',
'319262:61-319262:78','319262:82-319262:123','319262:129-319262:362','319263:1-319263:367',
'319264:1-319264:57','319265:1-319265:396','319266:1-319266:26','319267:1-319267:204',
'319268:1-319268:467','319270:1-319270:206','319300:1-319300:1132','319311:1-319311:1733'
)
)
process.TFileService = cms.Service("TFileService",
fileName = cms.string("output.root"),
closeFileFast = cms.untracked.bool(False)
)
submit-condorRECOall.csh (see the attachment):
cat ../${template_py} | sed "s|XXX|${mylist}|" > temp_py
cat temp_py | sed "s|YYY|${i}|" > ${submit_dir}/job_${i}.py
rm -f temp_py
shell:
./submit-condorRECOall.csh t201 t20.eos_1
PromptAnalyzer.cc:
// ------------ method called for each event ------------
void
PromptAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
{
...
}
// ------------ method called once each job just before starting event loop ------------
void
PromptAnalyzer::beginJob()
{
//...Luiz
edm::Service<TFileService> fs;
int nbins_eta = 80;
int nbins_pt = 100;
int nbins_phi = 64;
histosTH1F["hpt"] = fs->make<TH1F>("hpt","p_{T}",nbins_pt,0,5);
histosTH1F["heta"] = fs->make<TH1F>("heta","#eta",nbins_eta,-4,4);
histosTH1F["hphi"] = fs->make<TH1F>("hphi","#varphi",nbins_phi,-3.2,3.2);
histosTH1F["halgo"] = fs->make<TH1F>("halgo","Algo",15,0,15.);
histosTH1F["hnhits"] = fs->make<TH1F>("hnhits","nhits pix+strip",40,0,40.);
...
std::cout<<"booked all of Luiz' histograms."<<std::endl;
//--------------end of my histograms
}
// ------------ method called once each job just after ending the event loop ------------
void
PromptAnalyzer::endJob()
{
std::cout<<"ciao ciao..."<<std::endl;
}
// ------------ method called when starting to processes a run ------------
void
PromptAnalyzer::beginRun(edm::Run const& run, edm::EventSetup const& es)
{
bool changed(true);
if (hltConfig_.init(run, es, "HLT",changed)) {
hltConfig_.dump("Triggers");
hltConfig_.dump("PrescaleTable");
}
}
// ------------ method called when ending the processing of a run ------------
void
PromptAnalyzer::endRun(edm::Run const&, edm::EventSetup const&)
{
}
job_1914.py
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('root://eostotem//eos/totem/data/cmstotem/2018/90m/RECO_copy/TOTEM20/110000/2625EB46-453E-E911-8EB
8-008CFA06473C.root', 'root://eostotem//eos/totem/data/cmstotem/2018/90m/RECO_copy/TOTEM20/110000/261F8013-B83D-E911-9A99-003048F2E8C0.r
oot',)
,
lumisToProcess = cms.untracked.VLuminosityBlockRange('319104:1-319104:10',
'319104:15-319104:185','319124:91-319124:277','319125:1-319125:208','319159:125-319159:618',
'319174:1-319174:77','319175:1-319175:139','319176:1-319176:1803','319177:1-319177:232',
'319190:1-319190:317','319222:108-319222:294','319223:1-319223:131','319254:115-319254:263',
'319255:1-319255:164','319256:1-319256:726','319262:10-319262:10','319262:15-319262:16',
'319262:20-319262:23','319262:29-319262:34','319262:39-319262:40','319262:46-319262:58',
'319262:61-319262:78','319262:82-319262:123','319262:129-319262:362','319263:1-319263:367',
'319264:1-319264:57','319265:1-319265:396','319266:1-319266:26','319267:1-319267:204',
'319268:1-319268:467','319270:1-319270:206','319300:1-319300:1132','319311:1-319311:1733'
)
)
process.TFileService = cms.Service("TFileService",
fileName = cms.string("output.root"),
closeFileFast = cms.untracked.bool(False)
)
submit-condorRECOall-csh.txt (3.0 KB)