My Error/Exception Database

C++

  • 'blank' not found in this scope - usually means that your variable was not defined either in the .cc file or its corresponding .h file.
  • expected constructor, destructor, or type conversion before ‚< token- was thrown when i needed to #include at the beginning of the file.
  • undefined reference to 'blank'. make sure you are compiling with g++ rather than gcc. Otherwise its it can't find a header file that matches that variable or function that you are referencing
  • First got a segmentation fault after successful compilation but unsuccessful running, trying to use a function like so:
vector<Path*> vec;
vec.push_back(new Path());
int i = 0;
double =45.0;

vec[i].SetValue(double value);
cout<<vec[i]->GetValue()<<end;
Then I ended up changing it to vec.at(i)->GetValue and got:

  • got this exception after it compiled successfully but I ran it:
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check
Found out I was trying to access a value of a vector that hadn't been defined yet. i.e. I have a vector of j of n elements but I was trying to access the n+1 element.
  • When trying to compile, I get a compilation error that occurs in the #includes. It returns a bunch of lines like this
error: CLHEP/Matrix/Vector.h: No such file or directory

It is a problem in your BuildFile. You must add the correct use name line in the build file. In this case I had to add the lines:

<use name=DataFormats/ParticleFlowCandidate>
<use name=DataFormats/ParticleFlowReco>

before and after the \<export\> section.

CMS Exceptions

  • When trying to run a Fast Simulation cfg file I received this error:
cms::Exception caught in cmsRun
---- Configuration BEGIN
Error occurred while creating MuonSimHitProducer with label MuonSimHits
---- Configuration BEGIN
MissingParameter: Parameter 'MinEta' not found.
---- Configuration END
---- Configuration END
Figured that some had gone wrong with one of the files. Just removed my fast simulation directory and checked it out again.

  • Attempting to make a patTuple from my .root file that I created with Fast Simulation I kept getting this exception:
cms::Exception caught in cmsRun
---- FileOpenError BEGIN
---- FatalRootError BEGIN
Fatal Root Error: @SUB=TSystem::ExpandFileName
input: rfio:$1, output: rfio:$1
---- FatalRootError END

RootInputFileSequence::initFile(): Input file rfio:$1 was not found or could not be opened.

Error occurred while creating source PoolSource
---- FileOpenError END

I was working in CMSSW_3_5_8 with patLayer1_fromAOD_PF2PAT_full_cfg.py, and I just switched to CMSSW_3_6_1_patch2 and used PhysicsTools/PatAlgos/test/patTuple_PF2_PAT_cfg.py and it worked there.

  • I was trying to make an analyzer that accessed PFParticles and although it compiled I got this exception when I ran it.
---- ProductNotFound BEGIN
getByLabel: Found zero products matching all criteria
Looking for type: edm::Wrapper<std::vector<reco::PFCandidate> >
Looking for module label: selectedPatPFParticles
Looking for productInstanceName: 

---- ProductNotFound END

could be that you have a typo in the name. check that you are spelling the module label correctly by looking at myPatTuple with edmDumpEventContent myPatTuple.root. Then if that's not the case you could be trying to access a reco::PFCandidate when in fact it is a pat::PFParticle

  • I was trying to run PF2PAT with the file patTuple_PF2PAT_cfg.py but kept getting this exception when I ran on any dataset.
---- ProductNotFound BEGIN
getByLabel: Found zero products matching all criteria
Looking for sequence of type: reco::Candidate
Looking for module label: particleFlow
Looking for productInstanceName: 
cms::Exception going through module METProducer/pfMETPFlow run: 1 lumi: 1 event: 1000
---- ProductNotFound END

Must have been a problem with the version of PhysicsTools I was using because I erased it all then addpkg PhysicsTools/PatAlgos and addpkg PhysicsTools/PFCandProducer/ and it worked fine.

ROOT Errors

  • Had a function called that took in a TH2 and broke it down into two separate TGraphs (response and resolution) and then was supposed to draw them both. However when I actually ran it, the TCanvas was drawn with all its correct attributes (background color, title, etc.) but there were no points.

Passed the response and resolution TGraphs to the function as a reference instead of declaring them inside the function. It seems that although TCanvas lives outside the scope of the function, the histograms do not.

Crab Erros

  • After doing crab -create -cfg crab.cfg my jobs were "created" but when I tried to do crab -submit -c crab_directory/ it said:
crab:  No jobs to be submitted: first create them

The output root file in my pset_cfg.py did not agree with the output root file in my crab.cfg file

  • When running crab I noticed that I would submit jobs and it would start but then after doing crab -status -c crab_directory it would quickly go to Terminated.

Probably not a problem with crab but with your pset_cfg.py file. Do crab -getoutput -c crab_directory and then look and the crab_directory/res/ and look at one of the files in there to see if you got a cms exeption. However it is not always the case that it is a problem with your pset. This could occur even if you pset_cfg.py works with cmsRun, as an example for this case I didn't to send a file along with the job that I needed in order it to run (in this case a slha file). To send a file alone with it create a directory called data in $CMSSW_BASE/src/ and put it in there.

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2011-05-18 - ChristopherSilkworth
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback