GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » [FIXED] Problem with PndMCTrack::GetNPoints // PndDetectorList.h
[FIXED] Problem with PndMCTrack::GetNPoints // PndDetectorList.h [message #18885] Fri, 15 January 2016 15:57 Go to next message
Dominik Steinschaden is currently offline  Dominik Steinschaden
Messages: 28
Registered: April 2015
continuous participant
From: *smi.oeaw.ac.at
Hi all,

Currently I'm doing some analysis, in which I want to use the function
Int_t  GetNPoints(DetectorId detId)

of the class PndMCTrack.

I already have access to the information stored in the MCTrack, the only function I have problems with is this one.

As Input parameter an variable from Datatype "DetectorId" is needed.

As far as I understand in the included header file of PndMCTrack "PndDetecterList.h" this Datatyp is defined as:
enum DetectorId {
/** kRICH must be the 1st id, and kHYP must be the last one. Please put new detectors in between!! **/
  kRICH,kDRC,kDSK,kEMC,kGEM,kLUMI,kMDT,kMVD,kRPC,kSTT,kFTOF,kTOF,kFTS,kHYPG,kHYP};


But when I try to use this definition in my analysis macros, I always get errors.

e.g.:

using the line:
MCTrack->GetNPoints(kTOF)


error: Error: Symbol kTOF is not defined in current scope

If I only try to define a variable of type DetectorId:

DetectorId test;
     


Error: Symbol DetectorId test is not defined in current scope

Can someone explain how to proper use this function of MCTrack?

regards Dominik

[Updated on: Wed, 03 February 2016 23:31] by Moderator

Report message to a moderator

Re: Problem with PndMCTrack::GetNPoints // PndDetectorList.h [message #18886 is a reply to message #18885] Fri, 15 January 2016 16:05 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Did you add a
#include "PndDetectorList.h"
Or loaded the libPndData.so?
Re: Problem with PndMCTrack::GetNPoints // PndDetectorList.h [message #18894 is a reply to message #18886] Mon, 18 January 2016 12:03 Go to previous messageGo to next message
Dominik Steinschaden is currently offline  Dominik Steinschaden
Messages: 28
Registered: April 2015
continuous participant
From: *smi.oeaw.ac.at
Hello,

no I didn't include the PndDetectorList.h,

So just for a better understanding. When do I have to include the corresponding header files in the macros and when not?

For example I'm also using the functions of different classes like PndMCTrack, or the FairRunAna without including the header files.

Re: Problem with PndMCTrack::GetNPoints // PndDetectorList.h [message #18895 is a reply to message #18894] Mon, 18 January 2016 12:19 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Classes are compiled in the shared libraries which are automatically loaded by rootmap. PndDetectorList is not exactly a class, you need to include its header.
Previous Topic: PandaRoot at Prometheus GSI
Next Topic: GSI Annual Report
Goto Forum:
  


Current Time: Sat Apr 27 07:25:53 CEST 2024

Total time taken to generate the page: 0.00869 seconds