diff --git a/StRoot/RTS/include/rtsLog.h b/StRoot/RTS/include/rtsLog.h index be8b087ab84..c93e3cd42bb 100755 --- a/StRoot/RTS/include/rtsLog.h +++ b/StRoot/RTS/include/rtsLog.h @@ -93,41 +93,14 @@ void rtsLogAddJmlFile (char *fname); -/*Tonko: not used Special (mis)handling for STAR Offline Code -#ifdef __ROOT__ -#define RTS_DISABLE_LOG -#endif -*/ -#ifdef RTS_DISABLE_LOG - -#define RTS_ASSERT(expr) assert(expr) - - - #define LOG(SEV,STRING,ARGS...) \ - do { \ - const char *const yada = SEV ; \ - if((*yada == 'E')) { \ - fprintf(stderr,"" ANSI_RED "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'C')) { \ - fprintf(stderr,"" ANSI_RED "" ANSI_REVERSE "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'I')) { \ - fprintf(stderr,"" ANSI_BLUE "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'T')) { \ - fprintf(stderr,"" ANSI_GREEN "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'W')) { \ - fprintf(stderr,"" ANSI_CYAN "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'O')) { \ - fprintf(stderr,"" ANSI_BLUE "" ANSI_REVERSE "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - } while(0) \ +#ifndef RTS_ENABLE_LOG +#define RTS_ASSERT(expr) assert(expr) +#define LOG(SEV,STRING,ARGS...) +#define rtsLogUnix_v(str, ...) +#define rtsLogAddCmd(x) // the following become noops... @@ -136,7 +109,7 @@ void rtsLogAddJmlFile (char *fname); #define rtsLogLevelInt(x) #define rtsLogOutput(x) -#else /* RTS_DISABLE_LOG */ +#else /* RTS_ENABLE_LOG */ #ifdef __GNUC__ @@ -270,12 +243,12 @@ INLINE_HACK void rtsLogLevel(const char *level) -#endif +#endif /* RTS_LOG_COLORED */ -#endif +#endif /* __vxworks */ -#endif /* RTS_DISABLE_LOG */ +#endif /* RTS_ENABLE_LOG */ #ifdef __cplusplus } diff --git a/StRoot/RTS/src/LOG/Makefile b/StRoot/RTS/src/LOG/Makefile index 8107ebe358f..c1447ead38a 100755 --- a/StRoot/RTS/src/LOG/Makefile +++ b/StRoot/RTS/src/LOG/Makefile @@ -2,6 +2,7 @@ include ../rtsmakefile.def include ../rtsplus.def + # zap LDLIBS LDLIBS = @@ -28,7 +29,7 @@ rtsLog.o : rtsLog.C rtsLog: rtsLog.o rtsLogUnix.o $(CXX) $(CXXFLAGS) rtsLogUnix.o rtsLog.o -o rtsLog - + #operDisplay.sh: diff --git a/StRoot/RTS/src/LOG/rtsLog.C b/StRoot/RTS/src/LOG/rtsLog.C index 481ebdfe1b6..b9aa11ed557 100644 --- a/StRoot/RTS/src/LOG/rtsLog.C +++ b/StRoot/RTS/src/LOG/rtsLog.C @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) use_stdin = 0 ; rtsLogLevel(DBG) ; - rtsLogOutput(RTS_LOG_NET) ; + //rtsLogOutput(RTS_LOG_NET) ; memset(logstr,0,sizeof(logstr)) ; diff --git a/StRoot/RTS/src/LOG/rtsLogUnix.c b/StRoot/RTS/src/LOG/rtsLogUnix.c index 7e65ca77188..6d63e49c7ea 100755 --- a/StRoot/RTS/src/LOG/rtsLogUnix.c +++ b/StRoot/RTS/src/LOG/rtsLogUnix.c @@ -29,6 +29,30 @@ extern "C" { volatile int tonkoLogLevel = 2 ; + + + + +#ifdef RTS_ENABLE_LOG +#warning "DAQ logging is enabled" +#ifdef RTS_LOG_DEFAULT_NET +#warning "DAQ logging defaults to daqman" +#else +#warning "DAQ logging defaults to STDERR" +#endif /* RTS_LOG_DEFAULT_NET */ +#else +#warning "DAQ logging is disabled" +#endif /* RTS_ENABLE_LOG */ + + +#ifdef RTS_ENABLE_LOG + +#ifdef RTS_LOG_DEFAULT_NET +static int output_flag = RTS_LOG_NET ; +#else +static int output_flag = RTS_LOG_STDERR ; +#endif + static const char *getCmd(void) ; static int odesc = -1 ; static int handchange ; @@ -42,7 +66,7 @@ static char servER[80] = RTS_LOG_HOST ; #endif static int port = RTS_LOG_PORT ; -static int output_flag = RTS_LOG_NET ; + static char cmd[1024] ; /* @@ -113,7 +137,6 @@ void rtsLogAddJmlFile (char *fname) jml_fname = _g_fname; } - int rtsLogUnix_v(const char *str, ...) { /* common to all threads */ @@ -328,8 +351,6 @@ int rtsLogUnix_v(const char *str, ...) return 0 ; } - - static const char *getCmd(void) { @@ -370,6 +391,11 @@ static const char *getCmd(void) #endif } + +#endif + + + #ifdef __cplusplus } #endif diff --git a/StRoot/RTS/src/rtsmakefile.def b/StRoot/RTS/src/rtsmakefile.def index 2b345a55a73..7f0b82f740c 100755 --- a/StRoot/RTS/src/rtsmakefile.def +++ b/StRoot/RTS/src/rtsmakefile.def @@ -17,6 +17,8 @@ ifeq ($(HOST_NAME),daqman.starp.bnl.gov) endif +HOSTDOMAIN = $(shell hostname -d) + # jml... TARGET_CPU_STRING to mean the full string... # go from "uname" to gcc -mcpu=TARGET_CPU variant @@ -373,14 +375,38 @@ DEFINES = -D_REENTRANT ${RTS_DAQMAN_FLAGS} -DRTS_HOST_NAME=\"${HOST_NAME}\" -DTA # Set strict errors in LINUX -BASEFLAGS = -O3 -Wall -Werror -Wno-error=strict-overflow -Wno-error=maybe-uninitialized -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} +BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=maybe-uninitialized -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} + +#-O3 ifneq (${TARGET_SYSTEM}, LINUX) - BASEFLAGS = -O3 -Wall -pipe -fverbose-asm ${HOSTFLAGS} + BASEFLAGS = -Wall -pipe -fverbose-asm ${HOSTFLAGS} endif ifeq (${HOST_NAME},xvme01.daq.bnl.local) - BASEFLAGS = -O3 -Wall -Werror -Wno-error=strict-overflow -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} + BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} +endif + +# if not compiling on one of the standard domains, then +# use the default log destination of std_err +# if compiling on local domain, write to daqman +# +# if compiling somewhere else for writing to daqman these defines +ifeq (${HOSTDOMAIN},starp.bnl.gov) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},daq.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},daq2.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},trg.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},l4.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG endif CCFLAGS = ${BASEFLAGS} ${USRCCFLAGS} ${DEFINES} ${INCLUDES} @@ -396,6 +422,10 @@ ifeq ($(RTS_PROJECT),PP2PP) endif endif + + + + # noticed problems on Linux where the default linker gcc doesn't work well for g++ compiled # files LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH) diff --git a/StRoot/StBFChain/BigFullChain.h b/StRoot/StBFChain/BigFullChain.h index 64c9c046cf0..917dd831eaa 100644 --- a/StRoot/StBFChain/BigFullChain.h +++ b/StRoot/StBFChain/BigFullChain.h @@ -1715,7 +1715,7 @@ Bfc_st BFC[] = { // standard chains // Sti/Stv chains {"Sti" ,"Sti","","StiLib,StiLibs,SCL,StEvent,StDbT,TpcIT,compend,sim_T,tbutil","StiMaker" , "StEventUtilities,StiUtilities,StiMaker","Sti tracker",kFALSE}, - {"StiCA" ,"Sti","","Sti","StiMaker","TPCCATracker,StiCA" ,"StiCA tracker",kFALSE}, + {"StiCA" ,"Sti","","Sti","StiMaker","TPCCATracker" ,"StiCA tracker",kFALSE}, {"StiCAPerf","","","","", "TPCCATrackerPerformance", "CA Performance",kFALSE}, {"StiCA" ,"Sti","","Sti,StiLib,StiCALib,StiLibs,SCL,StEvent,StDbT,TpcIT,compend,tbutil","StiMaker" , "StEventUtilities,libEG,StiUtilities,StiMaker","Sti+CA tracker",kFALSE}, diff --git a/StRoot/StPicoDstMaker/StPicoDstMaker.cxx b/StRoot/StPicoDstMaker/StPicoDstMaker.cxx index 0dcc3021919..ed454980217 100644 --- a/StRoot/StPicoDstMaker/StPicoDstMaker.cxx +++ b/StRoot/StPicoDstMaker/StPicoDstMaker.cxx @@ -75,6 +75,7 @@ #include "StEmcRawMaker/StBemcTables.h" #include "StFmsDbMaker/StFmsDbMaker.h" +#include "StFcsDbMaker/StFcsDb.h" #include "tables/St_mtdModuleToQTmap_Table.h" #include "tables/St_mtdQTSlewingCorr_Table.h" @@ -2546,6 +2547,11 @@ void StPicoDstMaker::fillFwdTracks() { //_________________ void StPicoDstMaker::fillFcsClusters() { + StFcsDb* fcsDb = static_cast(GetDataSet("fcsDb")); + if( !fcsDb ) { + LOG_ERROR << "Cannot get StFcsDb object" << endm; + return; + } StMuFcsCollection * muFcs = mMuDst->muFcsCollection(); if ( !muFcs ) { LOG_ERROR << "Cannot get Fcs Collection from MuDst" << endm; @@ -2568,13 +2574,22 @@ void StPicoDstMaker::fillFcsClusters() { picoFcsCluster.setTheta(muCluster->theta()); picoFcsCluster.setChi2Ndf1Photon(muCluster->chi2Ndf1Photon()); picoFcsCluster.setChi2Ndf2Photon(muCluster->chi2Ndf2Photon()); - picoFcsCluster.setFourMomentum(muCluster->fourMomentum()); + double zVertex=picoDst()->event()->primaryVertex().z(); + StThreeVectorD xyz=fcsDb->getStarXYZ(muCluster->detectorId(), muCluster->x(), muCluster->y()); + StLorentzVectorD lv = fcsDb->getLorentzVector(xyz, muCluster->energy(), zVertex); + picoFcsCluster.setFourMomentum(lv.px(),lv.py(),lv.pz(),lv.e()); new((*(mPicoArrays[StPicoArrays::FcsCluster]))[counter]) StPicoFcsCluster(picoFcsCluster); } + LOG_INFO << "StPicoDstMaker::fillFcsClusters filled " << mPicoArrays[StPicoArrays::FcsCluster]->GetEntries() << endm; }//fillFcsClusters //_________________ void StPicoDstMaker::fillFcsHits() { + StFcsDb* fcsDb = static_cast(GetDataSet("fcsDb")); + if( !fcsDb ) { + LOG_ERROR << "Cannot get StFcsDb object" << endm; + return; + } StMuFcsCollection * muFcs = mMuDst->muFcsCollection(); if ( !muFcs ) { LOG_ERROR << "Cannot get Fcs Collection from MuDst" << endm; @@ -2588,10 +2603,13 @@ void StPicoDstMaker::fillFcsHits() { picoFcsHit.setIndex(counter); picoFcsHit.setDetectorId(muHit->detectorId()); picoFcsHit.setId(muHit->id()); - // picoFcsHit.setFourMomentum(muHit->fourMomentum()); - picoFcsHit.setFourMomentum( TLorentzVector(0, 0, 0, muHit->energy()) ); + double zVertex=picoDst()->event()->primaryVertex().z(); + StThreeVectorD xyz = fcsDb->getStarXYZ(muHit->detectorId(), muHit->id()); + StLorentzVectorD lv = fcsDb->getLorentzVector(xyz, muHit->energy(), zVertex); + picoFcsHit.setFourMomentum(lv.px(),lv.py(),lv.pz(),lv.e()); new((*(mPicoArrays[StPicoArrays::FcsHit]))[counter]) StPicoFcsHit(picoFcsHit); } + LOG_INFO << "StPicoDstMaker::fillFcsHits filled " << mPicoArrays[StPicoArrays::FcsHit]->GetEntries() << endm; }//fillFcsHit #if !defined (__TFG__VERSION__) diff --git a/StRoot/StPicoEvent/StPicoFcsCluster.h b/StRoot/StPicoEvent/StPicoFcsCluster.h index 0f174d82a8c..4160cef1040 100644 --- a/StRoot/StPicoEvent/StPicoFcsCluster.h +++ b/StRoot/StPicoEvent/StPicoFcsCluster.h @@ -31,7 +31,7 @@ class StPicoFcsCluster : public TObject { unsigned short detectorId() const { return mDetectorId; } int category() const { return mCategory; } int nTowers() const { return mNTowers; } - float energy() const { return mFourMomentumT; } + float energy() const { return mFourMomentumT; } // Energy float x() const { return mX; } // Mean x ("center of gravity") in local grid coordinate (1st moment). float y() const { return mY; } // Mean y ("center of gravity") in local grid coordinate (1st moment). float sigmaMax() const { return mSigmaMax; } // Maximum 2nd moment (along major axis). @@ -39,7 +39,7 @@ class StPicoFcsCluster : public TObject { float theta() const { return mTheta; } // Angle in x-y plane that defines the direction of least-2nd-sigma float chi2Ndf1Photon() const { return mChi2Ndf1Photon; } // chi^2/ndf for 1-photon fit to the cluster. float chi2Ndf2Photon() const { return mChi2Ndf2Photon; } // chi^2/ndf for 2-photon fit to the cluster. - const TLorentzVector& fourMomentum() const { return TLorentzVector( mFourMomentumX, mFourMomentumY, mFourMomentumZ, mFourMomentumT ); } // Cluster four-momentum (px, py, pz, E) + const TLorentzVector fourMomentum() const { return TLorentzVector( mFourMomentumX, mFourMomentumY, mFourMomentumZ, mFourMomentumT ); } // Cluster four-momentum (px, py, pz, E) void setId(int cluid) { mId = (UShort_t)cluid; } void setDetectorId(unsigned short detector) { mDetectorId=(UShort_t)detector; } @@ -53,8 +53,8 @@ class StPicoFcsCluster : public TObject { void setTheta(float theta) { mTheta = theta; } void setChi2Ndf1Photon(float chi2ndfph1) { mChi2Ndf1Photon = chi2ndfph1; } void setChi2Ndf2Photon(float chi2ndfph2) { mChi2Ndf2Photon = chi2ndfph2;} + void setFourMomentum(float px, float py, float pz, float e) { mFourMomentumX = px; mFourMomentumY = py; mFourMomentumZ = pz; mFourMomentumT = e; } void setFourMomentum(TLorentzVector p4) { mFourMomentumX = p4.X(); mFourMomentumY = p4.Y(); mFourMomentumZ = p4.Z(); mFourMomentumT = p4.T(); } - protected: UShort_t mId=0; // Eventwise cluster ID diff --git a/StRoot/StPicoEvent/StPicoFcsHit.h b/StRoot/StPicoEvent/StPicoFcsHit.h index 2b9283c8851..073eae34c07 100644 --- a/StRoot/StPicoEvent/StPicoFcsHit.h +++ b/StRoot/StPicoEvent/StPicoFcsHit.h @@ -28,12 +28,13 @@ class StPicoFcsHit : public TObject { Int_t index() const { return mId; } // Return unique Index of the hit unsigned short detectorId() const { return mDetectorId; } Int_t id() const { return mId; } // Id of the hit winthin detectorId - float energy() const { return mFourMomentumT; } - const TLorentzVector& fourMomentum() const { return TLorentzVector( mFourMomentumX, mFourMomentumY, mFourMomentumZ, mFourMomentumT ); } // Hit four-momentum (px, py, pz, E) + float energy() const { return mFourMomentumT; } // Energy + const TLorentzVector fourMomentum() const { return TLorentzVector( mFourMomentumX, mFourMomentumY, mFourMomentumZ, mFourMomentumT ); } // Hit four-momentum (px, py, pz, E) void setIndex(int index) { mIndex = (UShort_t)index; } void setDetectorId(unsigned short detector) { mDetectorId=(UShort_t)detector; } void setId(int id) { mIndex = (UShort_t)id; } + void setFourMomentum(float px, float py, float pz, float e) { mFourMomentumX = px; mFourMomentumY = py; mFourMomentumZ = pz; mFourMomentumT = e; } void setFourMomentum(TLorentzVector p4) { mFourMomentumX = p4.X(); mFourMomentumY = p4.Y(); mFourMomentumZ = p4.Z(); mFourMomentumT = p4.T(); } protected: diff --git a/StRoot/StiCA/StiCATpcSeedFinder.cxx b/StRoot/Sti/StiCATpcSeedFinder.cxx similarity index 97% rename from StRoot/StiCA/StiCATpcSeedFinder.cxx rename to StRoot/Sti/StiCATpcSeedFinder.cxx index 575a487efb8..eeefe44b25c 100644 --- a/StRoot/StiCA/StiCATpcSeedFinder.cxx +++ b/StRoot/Sti/StiCATpcSeedFinder.cxx @@ -192,5 +192,3 @@ StiDebug::Count("Reused_Pct",reUsed, pct); } mEnded = 3; return 0; } -//________________________________________________________________________________ -StiCATpcSeedFinder* StiCALoader::New() { return new StiCATpcSeedFinder;} diff --git a/StRoot/StiCA/StiCATpcSeedFinder.h b/StRoot/Sti/StiCATpcSeedFinder.h similarity index 91% rename from StRoot/StiCA/StiCATpcSeedFinder.h rename to StRoot/Sti/StiCATpcSeedFinder.h index daf0a0bda8f..e300cbfcf18 100644 --- a/StRoot/StiCA/StiCATpcSeedFinder.h +++ b/StRoot/Sti/StiCATpcSeedFinder.h @@ -42,12 +42,4 @@ class StiCATpcSeedFinder: public StiTrackFinder std::vector *mSeeds; }; -class StiCALoader { -public: -static StiCATpcSeedFinder* New(); -#if 0 -ClassDef(StiCALoader,0) -#endif -}; - #endif diff --git a/StRoot/StiCA/StiCATpcTrackerInterface.cxx b/StRoot/Sti/StiCATpcTrackerInterface.cxx similarity index 100% rename from StRoot/StiCA/StiCATpcTrackerInterface.cxx rename to StRoot/Sti/StiCATpcTrackerInterface.cxx diff --git a/StRoot/StiCA/StiCATpcTrackerInterface.h b/StRoot/Sti/StiCATpcTrackerInterface.h similarity index 100% rename from StRoot/StiCA/StiCATpcTrackerInterface.h rename to StRoot/Sti/StiCATpcTrackerInterface.h diff --git a/StRoot/Sti/StiDefaultToolkit.cxx b/StRoot/Sti/StiDefaultToolkit.cxx index 7851fea4aac..8e203daceb3 100644 --- a/StRoot/Sti/StiDefaultToolkit.cxx +++ b/StRoot/Sti/StiDefaultToolkit.cxx @@ -390,6 +390,7 @@ #include "Sti/StiDefaultTrackFilter.h" #include "Sti/StiDetectorGroup.h" #include "Sti/StiDetectorGroups.h" +#include "Sti/StiCATpcSeedFinder.h" #include "StDetectorDbMaker/StiHitErrorCalculator.h" #include "StiTpc/StiTpcHitLoader.h" #include "StiSvt/StiSvtHitLoader.h" @@ -639,11 +640,7 @@ StiTrackFinder * StiDefaultToolkit::getTrackSeedFinderKNN() //______________________________________________________________________________ StiTrackFinder * StiDefaultToolkit::getTrackSeedFinderCA() { - gSystem->Load("TPCCATracker"); - gSystem->Load("StiCA"); - auto *mySeed = (StiTrackFinder*)gROOT->ProcessLineFast("StiCALoader::New()"); - assert(mySeed); - return mySeed; + return new StiCATpcSeedFinder(); } //______________________________________________________________________________ diff --git a/StRoot/Sti/StiMasterDetectorBuilder.cxx b/StRoot/Sti/StiMasterDetectorBuilder.cxx index 8f146366e14..0c8aca51886 100644 --- a/StRoot/Sti/StiMasterDetectorBuilder.cxx +++ b/StRoot/Sti/StiMasterDetectorBuilder.cxx @@ -25,7 +25,6 @@ void StiMasterDetectorBuilder::build(StMaker&source) { if (! gGeoManager) StiVMCToolKit::GetVMC(); - TGeoManager *gGeoManagerSV = gGeoManager; gGeoManager = 0; StMaker *chain=StMaker::GetChain(); LOG_INFO << "We are StiMasterDetectorBuilder::build() and will clone the geometry if exists" << endm; @@ -35,12 +34,6 @@ void StiMasterDetectorBuilder::build(StMaker&source) } #if 1 - if ( gGeoManagerSV ){ - LOG_INFO << "Create a clone of VmcGeometry for reconstruction" << endm; - gGeoManagerSV->Clone("CloneGeom"); - } else { - LOG_INFO << "Could not get a pointer to gGeoManager " << endm; - } #else if ( chain ) { LOG_INFO << "StiMasterDetectorBuilder::build() : Create clone of VmcGeometry by reinitialization for reconstruction" <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> WHY IS THIS COMMENTED OUT??? void AgBlock::Inherit() { diff --git a/StarVMC/StarAgmlLib/AgBlock.h b/StarVMC/StarAgmlLib/AgBlock.h index 653b60e9510..be59cca0b61 100644 --- a/StarVMC/StarAgmlLib/AgBlock.h +++ b/StarVMC/StarAgmlLib/AgBlock.h @@ -153,7 +153,7 @@ class AgBlock : public TNamed int numberBranches() const { return mNumberBranches; } void branch(){ mNumberBranches++; } - void AddCut( TString cut, double value ){ mGstpar[cut] = value; } + void AddCut( TString cut, double value ); std::map& GetCuts() { return mGstpar; } private: diff --git a/StarVMC/StarAgmlLib/AgMLExtension.cxx b/StarVMC/StarAgmlLib/AgMLExtension.cxx index 5287b9bdb3f..de85e142434 100644 --- a/StarVMC/StarAgmlLib/AgMLExtension.cxx +++ b/StarVMC/StarAgmlLib/AgMLExtension.cxx @@ -13,3 +13,5 @@ AgMLExtension::AgMLExtension() : TGeoRCExtension(), { Grab(); } + +void AgMLExtension::AddCut( TString cut, double value ){ mGstpar[cut] = value; } diff --git a/StarVMC/StarAgmlLib/AgMLExtension.h b/StarVMC/StarAgmlLib/AgMLExtension.h index 3d1d0bbef11..e379749d116 100644 --- a/StarVMC/StarAgmlLib/AgMLExtension.h +++ b/StarVMC/StarAgmlLib/AgMLExtension.h @@ -57,7 +57,7 @@ class AgMLExtension : public TGeoRCExtension { std::vector GetUserHits(){ return mHitScoring; } - void AddCut( TString cut, double value ){ mGstpar[cut] = value; } + void AddCut( TString cut, double value ); std::map& GetCuts() { return mGstpar; } diff --git a/StarVMC/StarAgmlLib/AgModule.cxx b/StarVMC/StarAgmlLib/AgModule.cxx index 95c41d06912..29465ba7618 100644 --- a/StarVMC/StarAgmlLib/AgModule.cxx +++ b/StarVMC/StarAgmlLib/AgModule.cxx @@ -25,6 +25,8 @@ TDataSet *AgModule::Geom() else return mGeomSet; }; +void AgModule::AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; } + // --------------------------------------------------------------------------------------------- AgBlock *AgModule::AddBlock( const Char_t *name, AgBlock *_block ) { diff --git a/StarVMC/StarAgmlLib/AgModule.h b/StarVMC/StarAgmlLib/AgModule.h index dd0f3f5a1f6..c69e5a3d61d 100644 --- a/StarVMC/StarAgmlLib/AgModule.h +++ b/StarVMC/StarAgmlLib/AgModule.h @@ -40,7 +40,7 @@ class AgModule : public AgBlock void SetTrackingFlag( int flag ){ mTrackingFlag = flag; } int GetTrackingFlag(){ return mTrackingFlag; } - void AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; } + void AddHitScoring( TString name, AgMLScoring* sc ); std::map GetHitScoring(){ return mHitScoring; } private: diff --git a/StarVMC/StarAgmlLib/AgShape.cxx b/StarVMC/StarAgmlLib/AgShape.cxx index 66a0fd26a38..5ca97db14c9 100644 --- a/StarVMC/StarAgmlLib/AgShape.cxx +++ b/StarVMC/StarAgmlLib/AgShape.cxx @@ -626,6 +626,8 @@ Bool_t AgShape::morphed() return true; // No shapes match } +std::vector< TString > &AgShape::parList(){ return mParList[mId]; } + // ============================================================================================================= Bool_t AgShape::parameterized() { diff --git a/StarVMC/StarAgmlLib/AgShape.h b/StarVMC/StarAgmlLib/AgShape.h index 63ab9a840a5..a58c8e9f7e0 100644 --- a/StarVMC/StarAgmlLib/AgShape.h +++ b/StarVMC/StarAgmlLib/AgShape.h @@ -67,7 +67,7 @@ class AgShape : public TNamed, public AgParameterList Bool_t morphed(); /// Return a list of the parameters which define this shape - std::vector< TString > &parList(){ return mParList[mId]; } + std::vector< TString > &parList(); /// Returns true if the shape's parameters are to be set /// when positioned diff --git a/StarVMC/StarAgmlLib/StarAgmlStacker.cxx b/StarVMC/StarAgmlLib/StarAgmlStacker.cxx index 0e1bc6d1c07..a79aebeb2bd 100644 --- a/StarVMC/StarAgmlLib/StarAgmlStacker.cxx +++ b/StarVMC/StarAgmlLib/StarAgmlStacker.cxx @@ -129,6 +129,12 @@ TString StarAgmlStacker::realname( TString nname ) return mRealnames[nname]; } + +const std::vector &StarAgmlStacker::nicknames(const Char_t *name) +{ + return mNicknames[ TString(name) ]; +} + // --------------------------------------------------------------------------------------------------- void StarAgmlStacker::Debug( const Char_t *name, const Char_t *flag ) { diff --git a/StarVMC/StarAgmlLib/StarAgmlStacker.h b/StarVMC/StarAgmlLib/StarAgmlStacker.h index ea323dbaed6..809b6496682 100644 --- a/StarVMC/StarAgmlLib/StarAgmlStacker.h +++ b/StarVMC/StarAgmlLib/StarAgmlStacker.h @@ -35,10 +35,7 @@ class StarAgmlStacker : public TNamed virtual Bool_t SearchVolume( const AgShape &shape, const AgAttribute &attr )=0; - const std::vector &nicknames(const Char_t *name) - { - return mNicknames[ TString(name) ]; - } + const std::vector &nicknames(const Char_t *name); void Debug( const Char_t *name, const Char_t *flag="position" ); diff --git a/mgr/Conscript-standard b/mgr/Conscript-standard index 0df341f33a7..db1f9b9204b 100644 --- a/mgr/Conscript-standard +++ b/mgr/Conscript-standard @@ -895,7 +895,7 @@ if ( $pkg !~ /^sim$/ && $pkg !~ /^gen$/ ) { $CPPPATH = "#StarVMC" . $main::PATH_SEPARATOR . $CPPPATH; # print "StarVMC change CPPPATH to $CPPPATH =========\n"; - } elsif ($pkg eq "TPCCATracker" or $pkg eq "StiCA") { + } elsif ($pkg eq "TPCCATracker" or $pkg eq "Sti") { $CPPPATH .= $main::PATH_SEPARATOR . "#" . $Dir . $main::PATH_SEPARATOR . "#" . $Dir . "/code"; diff --git a/mgr/Dyson/Export/AgROOT.py b/mgr/Dyson/Export/AgROOT.py index 314ecc42791..8934d724515 100644 --- a/mgr/Dyson/Export/AgROOT.py +++ b/mgr/Dyson/Export/AgROOT.py @@ -687,7 +687,7 @@ class StarGeometry { /// Construct geometry with the specified tag, and return wrapped in a TDataSet static TDataSet* Construct( const char* name = "%s"); static bool List ( const char* name = "%s"); - static void Whitelist( const char* name, int value=1 ){ whitelist[name]=value; } + static void Whitelist( const char* name, int value=1 ); static void InitAgML ( const char* stacker="StarTGeoStacker"); StarGeometry(){ /* nada */ }; virtual ~StarGeometry(){ /* nada */ } @@ -718,6 +718,8 @@ class Geometry : public StarGeometry { std::map StarGeometry::whitelist= {{"all",1}}; + void StarGeometry::Whitelist(const char* name, int value){ whitelist[name]=value; } + TDataSet* StarGeometry::Construct( const char* name ) { std::string tag = name;