Commit 9548004f authored by dino's avatar dino
Browse files

Fixed a problem with the time window in the (offline) EventBuilder/EventMerger.

Added the type (1=photo,2=compton, 3=pair_production)of tracking in AGATREE (gammaTrType)
Generalized CMakeLists.txt re finding the packages Root and Boost 

git-svn-id: svn://gal-serv.lnl.infn.it/agata/trunk/narval_emulator@993 170316e4-aea8-4b27-aad4-0380ec0519c9
parent d8fa2e8b
......@@ -2,31 +2,30 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(femul)
#Check the compiler and set the compile and link flags
set(CMAKE_BUILD_TYPE Release)
# select the off-line version
ADD_DEFINITIONS(-DNRV_TYPE=NRV_OFFLINE)
# Type of build
set(CMAKE_BUILD_TYPE "Release")
# Where FIND_PACKAGE lshould search "non-distribution" FindXxxx.cmake
set(CMAKE_MODULE_PATH ".")
find_package(ROOT)
# select one of the 2 options
IF(1)
# c stuff compiled as C++ (as we do in the ACQ)
ADD_DEFINITIONS(-x c++)
else()
# c stuff compiles as C --> mgt_inizialize and mgt_process_event defined
# as 'extern "C"' in TrackingFilterOFT.cpp and TrackingFilterMGT.cpp
ADD_DEFINITIONS(-DUSING_CMAKE)
endif()
# Select the off-line version of the actors
ADD_DEFINITIONS(-DNRV_TYPE=NRV_OFFLINE)
# enable the vectorized version of the PSA FOM-loop
#ADD_DEFINITIONS(-msse4)
# Enable root
ADD_DEFINITIONS(-DTF_ROOTTREE)
FIND_PACKAGE(ROOT)
MESSAGE("Root: ${ROOT_INCLUDE_DIR} ${ROOT_LIBRARY_DIR}")
#MESSAGE("${ROOT_LIBRARIES}")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/agata/tools/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lz -pthread -lm -ldl -rdynamic")
#SET(CMAKE_LINKER_FLAGS /agata/tools/root/lib)
# Find Boost
FIND_PACKAGE(Boost)
MESSAGE("Boost: ${Boost_INCLUDE_DIR} ${Boost_LIBRARY_DIRS}")
# Enable the vectorized version of the PSA FOM-loop
ADD_DEFINITIONS(-DUSE_SSE_VERSION)
ADD_DEFINITIONS(-msse4)
# The sources to build femul
SET(ADFDIR "../myADF0.2")
SET(PRISMA "../PRISMA/src/lib_prisma")
SET(ACTORS "..")
......@@ -43,9 +42,9 @@ ${ACTORS}/filters/Tracking ${ACTORS}/filters/Tracking/includeOFT ${ACTORS
${ACTORS}/builders
${ADFDIR} ${ADFDIR}/standalone
${PRISMA}/include
/usr/include/boost
${Boost_INCLUDE_DIR}
/usr/include/skstream-0.3 /usr/lib/skstream-0.3/include
/agata/tools/root/include
${ROOT_INCLUDE_DIR}
${ACTORS}/producers/Basic
${ACTORS}/consumers/Basic
)
......@@ -84,6 +83,9 @@ ${ACTORS}/filters/Tracking/includeMGT/mgt_geoagata.c
${ACTORS}/filters/Tracking/includeMGT/mgt_vectorlib.c
${ACTORS}/builders/EventBuilder.cpp
)
IF(NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(${actors_SRCS} PROPERTIES LANGUAGE CXX)
ENDIF()
SET(adf_SRCS
${ADFDIR}/ADFConfig.cpp
......@@ -144,25 +146,20 @@ ${PRISMA}/src/Vectors.cc
${PRISMA}/src/zedCalculator.cc
)
set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR})
link_directories( ${LINK_DIRECTORIES})
message(${LINK_DIRECTORIES})
SET(femul_SRCS ${FEMDIR}/femul.cpp ${adf_SRCS} ${actors_SRCS} ${PRISMA_SRCS} )
ADD_EXECUTABLE(femul_cmake ${femul_SRCS})
SET(LINK_DIRECTORIES ${Boost_LIBRARY_DIRS} ${ROOT_LIBRARY_DIR})
#MESSAGE("LINK_DIRECTORIES: ${LINK_DIRECTORIES}")
LINK_DIRECTORIES( ${LINK_DIRECTORIES})
IF(WIN32)
TARGET_LINK_LIBRARIES(femul_cmake /lib/libboost_thread-mt.a)
SET(LINK_LIBRARIES libboost_thread-mt.a ${ROOT_LIBRARIES})
ELSE()
TARGET_LINK_LIBRARIES(femul_cmake /usr/lib/libboost_thread-mt.so ${ROOT_LIBRARIES})
SET(LINK_LIBRARIES libboost_thread-mt.so ${ROOT_LIBRARIES})
ENDIF()
#MESSAGE("LINK_LIBRARIES: ${LINK_LIBRARIES}")
ADD_EXECUTABLE(femul ${femul_SRCS})
TARGET_LINK_LIBRARIES(femul ${LINK_LIBRARIES})
#MESSAGE("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
#
#IF(WIN32)
# MESSAGE("WIN32")
#ELSE(WIN32)
# MESSAGE("not WIN32")
#ENDIF(WIN32)
......@@ -14,10 +14,11 @@
MESSAGE(STATUS "Looking for Root...")
SET(ROOT_CONFIG_SEARCHPATH
${SIMPATH}agata//tools/root/bin
$ENV{ROOTSYS}/bin
/usr/bin
/agata/tools/root/bin
/home/daniele/Programs/root.5.27.06/bin
)
#"/home/daniele/Programs/root.5.27.06/bin"
SET(ROOT_DEFINITIONS "")
......
......@@ -172,7 +172,7 @@ struct actor {
class chain {
public:
int myIndex; // numeric identifier of the chain
string confDir; // the configuration directory of all actor of this chain
string confDir; // the configuration directory of all actors of this chain
int numActors; // number of actors in the chain
vector<actor> theActors; // actor: NONE; BUILDER; PRODUCER; FILTER; CONSUMER; DISPATCHER
char *ioBuffs[2]; // IO buffers. Input/Output type toggles along the execution type
......@@ -700,7 +700,7 @@ bool topologyConfNew()
bool printmsg = true;
switch (pChain->theActors[na].libType) {
case BUILDER:
if(pActor->libName == "EventBuilder") {
if(pActor->libName == "EventBuilder") {
cout << "EventBuilder ..." << endl;
if(indBuilder >=0 ) {
cout << "There can be at most one EventBuilder " << endl;
......@@ -711,7 +711,8 @@ bool topologyConfNew()
return false;
}
pActor->libItem = 0;
EventBuilder::process_config(pActor->libConf.c_str(), &error_config);
//EventBuilder::process_config(pActor->libConf.c_str(), &error_config); // see comment in EventBuilder::process_config()
EventBuilder::process_config((pActor->libConf+"/EventBuilder.conf").data(), &error_config);
if(error_config) {cout << pActor->libName << "::process_config failed" << endl; return false;}
pActor->ptrBuilder = new EventBuilder(totBuilders, pActor->libItem); // to be used as EventBuilder
pEventBuilder = pActor->ptrBuilder;
......@@ -728,7 +729,8 @@ bool topologyConfNew()
return false;
}
pActor->libItem = 1;
EventBuilder::process_config(pActor->libConf.c_str(), &error_config);
//EventBuilder::process_config(pActor->libConf.c_str(), &error_config); // see comment in EventBuilder::process_config()
EventBuilder::process_config((pActor->libConf+"/EventMerger.conf").data(), &error_config);
if(error_config) {cout << pActor->libName << "::process_config failed" << endl; return false;}
pActor->ptrBuilder = new EventBuilder(totMergers, pActor->libItem); // to be used as EventMerger
pEventMerger = pActor->ptrBuilder;
......
......@@ -45,7 +45,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\PRISMA\src\lib_prisma\include;&quot;C:\Program Files (x86)\boost\boost_1_40&quot;;..\myADF0.2;..\myADF0.2\standalone;..\common;..\producers\Crystal;..\producers\Crystal\includeATCA;..\producers\AncillaryTCP;..\filters\Preprocessing;..\filters\Preprocessing\includePrePSA;..\filters\Ancillary;..\filters\Ancillary\includeVME;..\filters\PSA;..\filters\PSA\includePSA;..\filters\Tracking;..\filters\Tracking\includeOFT;..\filters\Tracking\includeMGT;..\builders;C:\root\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NRV_TYPE=NRV_OFFLINE"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NRV_TYPE=NRV_OFFLINE;TF_ROOTTREE;USE_SSE_VERSION"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
......@@ -66,8 +66,9 @@
<Tool
Name="VCLinkerTool"
UseLibraryDependencyInputs="true"
AdditionalDependencies="libCore.lib libTree.lib libRIO.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;C:\Program Files (x86)\boost\boost_1_40\lib&quot;"
AdditionalLibraryDirectories="&quot;C:\Program Files (x86)\boost\boost_1_40\lib&quot;;C:\root\lib"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
......@@ -143,7 +144,7 @@
Name="VCLinkerTool"
UseLibraryDependencyInputs="true"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib64-VC90"
AdditionalLibraryDirectories="C:\Boost\lib64-VC90;C:\root\include"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
......@@ -198,7 +199,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\PRISMA\src\lib_prisma\include;&quot;C:\Program Files (x86)\boost\boost_1_40&quot;;..\myADF0.2;..\myADF0.2\standalone;..\common;..\producers\Crystal;..\producers\Crystal\includeATCA;..\producers\AncillaryTCP;..\filters\Preprocessing;..\filters\Preprocessing\includePrePSA;..\filters\Ancillary;..\filters\Ancillary\includeVME;..\filters\PSA;..\filters\PSA\includePSA;..\filters\Tracking;..\filters\Tracking\includeOFT;..\filters\Tracking\includeMGT;..\builders;C:\root\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NRV_OFFLINE"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NRV_TYPE=NRV_OFFLINE;TF_ROOTTREE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
......@@ -217,8 +218,9 @@
<Tool
Name="VCLinkerTool"
UseLibraryDependencyInputs="false"
AdditionalDependencies="libCore.lib libTree.lib libRIO.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Program Files (x86)\boost\boost_1_40\lib"
AdditionalLibraryDirectories="&quot;C:\Program Files (x86)\boost\boost_1_40\lib&quot;;C:\root\lib"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
......
......@@ -208,7 +208,7 @@ EventBuilder::~EventBuilder() {
//PrintStat();
}
bool EventBuilder::Reset(int nch)
bool EventBuilder::Reset(int nch, int wminfold, int wsumbus)
{
if(nchains > 0) {
if(evq) { delete [] evq; evq = NULL; }
......@@ -229,8 +229,8 @@ bool EventBuilder::Reset(int nch)
iqueSize = new UInt_t[nchains ]; memset(iqueSize, 0, sizeof(UInt_t)*nchains);
isGood = new Bool_t[nchains ]; memset(isGood, false, sizeof(Bool_t)*nchains);
timeout = 100*tst1second;
tsumbus = 300;
//minFold = 1;
tsumbus = wsumbus;
minFold = wminfold;
errState = 0;
noBuild1 = 0;
noBuild2 = 0;
......@@ -479,6 +479,7 @@ void EventBuilder::process_block( int ichain,
cout << " **";
cout << endl;
}
//cServer.Exec();
if(oevCount > 0)
noBuild1 = noBuild2 = 0;
......@@ -566,19 +567,39 @@ void EventBuilder::CheckEvent_Tstamp()
minTstamp -= tsumbus; // back to real minimum
}
void EventBuilder::process_config ( const Char_t *directory_path, UInt_t *error_code )
//// Due to the Narval API we are calling EventBuilder.conf both for the Builder and for the Merger
//// (the two configuration files are in the same directory and the file name is given by the Mother Class)
//void EventBuilder::process_config ( const Char_t *directory_path, UInt_t *error_code )
//{
// *error_code = 0;
// cout << gMotherClass + "::process_config() called with directory_path = " << directory_path << endl;
//
// gConfPath = string( directory_path );
// forceTailSlash(gConfPath);
//
// int rv = getKeyFromFile(gConfPath + gMotherClass + ".conf", "ActualClass", gActualClass);
// if(rv == 2)
// *error_code = 102; // Fatal error because the configuration file MUST be present
//}
// To call the specific one we change behaviour and pass the full name of the configuration file
void EventBuilder::process_config ( const Char_t *full_path, UInt_t *error_code )
{
*error_code = 0;
cout << gMotherClass + "::process_config() called with directory_path = " << directory_path << endl;
gConfPath = string( directory_path );
forceTailSlash(gConfPath);
cout << gMotherClass + "::process_config() called with configuration file = " << full_path << endl;
// Get name of daughter class from configuration directory_path/gMotherClass.conf
// No daughter class foreseen for his actor; called just to check if configuraton file exists
int rv = getKeyFromFile(gConfPath + gMotherClass + ".conf", "ActualClass", gActualClass);
int rv = getKeyFromFile(full_path, "ActualClass", gActualClass);
if(rv == 2)
*error_code = 102; // Fatal error because the configuration file MUST be present
gConfPath = string( full_path );
size_t ll = gConfPath.find_last_of("/");
if(ll != string::npos)
gConfPath = gConfPath.substr(0, ll);
forceTailSlash(gConfPath);
*error_code = 0;
}
void EventBuilder::process_initialise (UInt_t *error_code)
......@@ -589,16 +610,16 @@ void EventBuilder::process_initialise (UInt_t *error_code)
if(*error_code)
return;
// bisognerebbe avere classi distinte ?
bool ok = bBuilder ? InitAsBuilder() : InitAsMerger();
if(!ok)
*error_code = 60;
}
bool EventBuilder::InitAsBuilder()
{
InitKeys(nchains);
Reset(nchains, minFold, (int)tsumbus);
if(useEventNumber)
cout << "\n ==> EventBuilder uses EventNumber" << endl;
else
......@@ -606,9 +627,6 @@ bool EventBuilder::InitAsBuilder()
cout << " ==> Minimum fold is " << minFold << endl;
InitKeys(nchains);
Reset(nchains);
UInt_t notcorr = (UInt_t)count(vCorrection.begin(), vCorrection.end(), 0);
bTstampCorrection = notcorr < nchains;
if(bTstampCorrection) {
......@@ -635,6 +653,9 @@ bool EventBuilder::InitAsBuilder()
bool EventBuilder::InitAsMerger()
{
InitKeys(nchains);
Reset(nchains, minFold, (int)tsumbus);
if(useEventNumber)
cout << "\n ==> EventMerger uses EventNumber" << endl;
else
......@@ -642,9 +663,6 @@ bool EventBuilder::InitAsMerger()
cout << " ==> Minimum fold is " << minFold << endl;
InitKeys(nchains);
Reset(nchains);
UInt_t notcorr = (UInt_t)count(vCorrection.begin(), vCorrection.end(), 0);
bTstampCorrection = notcorr < nchains;
if(bTstampCorrection) {
......
......@@ -164,7 +164,7 @@ public:
virtual ~EventBuilder();
bool Reset( int nch );
bool Reset( int nch , int wminfold = 1, int wsumbus = 300);
bool isEmpty(int ichain) {
return evq[ichain].isEmpty();
......
......@@ -101,6 +101,12 @@ public:
void SetHistGroup(nDhistGroup *hg) { hGroup = hg; }
#endif //LOCALSPECTRA
void Start(std::string name, unsigned int cycle = defaultCycleTime);
unsigned int Exec() {
if(CheckComFile())
return ExecLong();
else
return 0;
}
unsigned int Exec(unsigned long long tstNew)
{
++mCount;
......
......@@ -536,6 +536,7 @@ UInt_t AncillaryFilter::ProcessBlock (ADF::FrameBlock &in, ADF::FrameBlock &out)
LOCK_COUT;
cServer.Prompt(-1, nevs, fBlockOut.GetSize());
//cServer.Exec();
return error_code;
}
......
......@@ -495,6 +495,7 @@ UInt_t PSAFilter::ProcessBlockNoThreads(ADF::FrameBlock &in, ADF::FrameBlock &ou
LOCK_COUT;
cServer.Prompt(crystal_id, nevs, fBlockOut.GetSize() );
//cServer.Exec();
return error_code;
}
......@@ -704,6 +705,7 @@ UInt_t PSAFilter::ProcessBlockThreads(ADF::FrameBlock &in, ADF::FrameBlock &out)
LOCK_COUT;
cServer.Prompt(crystal_id, nevs, fBlockOut.GetSize() );
//cServer.Exec();
return error_code;
}
......
......@@ -180,9 +180,9 @@ private:
#define COMPUTE_VALUE(nn) COMPUTE_VALUE0(nn)
// As realTrace is used repeatedly, it will be in the cache after the first point. Terefore it is not worth prefetching it (actually it seems to be a bit slower)
// As realTrace is used repeatedly, it will be in the cache after the first point. Therefore it is not worth prefetching it (actually it seems to be a bit slower)
// The basis is used only once ==> we should prefetch it with _MM_HINT_NTA (non temporal with minimal cache pollution). But _MM_HINT_T0 seems to be a bit faster.
// Anyway none of them brings real improvements (at least with my laptop) and can threfore be safely commented-out
// Anyway none of them brings real improvements (at least with my laptop) and can therefore be safely commented-out
#if defined(__GNUC__)
# define PREFETCH_REAL(nn) //( __builtin_prefetch (&realTrace[nn], 0, 1) )
# define PREFETCH_BASE(nn) ( __builtin_prefetch (&baseTrace[nn], 0, 0) )
......
......@@ -9,14 +9,13 @@ const double METRIC = 0.3; // norm for the figure of merit
const int RMETRIC = 64*1024; // max tabulated deviation !!!!!!!!! DOES NOT WORK WITH SHORT IF > 65536 !!!!!!!!!!!!!!
const int NMETRIC = 2*RMETRIC; // positive and negative
#define USE_SSE_VERSION // uncomment to use SSE intrinsics for the innermost figure-of-merit loop
//#define USE_SSE_VERSION // uncomment to use SSE intrinsics for the innermost figure-of-merit loop
// the vectorized version does not work with the cygwin gcc compiler
#if defined(USE_SSE_VERSION) && (OS_TYPE==OS_CYGWIN)
# undef USE_SSE_VERSION
#endif
#define GS_TYPE_FLOAT 1
#define GS_TYPE_INT32 2
#define GS_TYPE_INT16 3
......
......@@ -325,6 +325,7 @@ UInt_t PreprocessingFilter::ProcessBlock (ADF::FrameBlock &in, ADF::FrameBlock &
LOCK_COUT;
cServer.Prompt(crystal_id, nevs, fBlockOut.GetSize() );
//cServer.Exec();
return error_code;
}
......
......@@ -199,6 +199,7 @@ TrackingFilter::~TrackingFilter()
delete [] gammaE;
delete [] gammaT;
delete [] gammaTstamp;
delete [] gammaTrType;
delete [] gammaX1;
delete [] gammaY1;
delete [] gammaZ1;
......@@ -806,6 +807,7 @@ UInt_t TrackingFilter::ProcessBlock(ADF::FrameBlock &in, ADF::FrameBlock &out)
if( trigUnknown )
cout << " ** " << trigUnknown << " **" ;
cout << endl;
cServer.Exec(); // check whether to write the spectra
return error_code;
}
......@@ -1030,9 +1032,11 @@ bool TrackingFilter::PostProcessEvent()
#endif
#ifdef TF_LOCALSPECTRA
OftSpec_EE->Incr(0, 2, int(fEnergyGain*pg->E)); // 0-2 Tracked
if(hasRecoil)
OftSpec_EE->Incr(0, 2 + pg->type, int(fEnergyGain*pg->E)); // 0-3 Photo=1 0-4 Compt=2 0-5 pair=3
if(hasRecoil) {
OftSpec_EE->Incr(1, 2, int(fEnergyGain*pg->E)); // 1-2 Tracked in coinc with ancillary
OftSpec_EE->Incr(0, 3 + pg->type, int(fEnergyGain*pg->E)); // 0-3 Photo 0-4 Compt 0-5 pair
OftSpec_EE->Incr(1, 2 + pg->type, int(fEnergyGain*pg->E)); // 0-3 Photo=1 0-4 Compt=2 0-5 pair=3
}
#endif //TF_LOCALSPECTRA
#ifdef TF_FromGRU_
if(pg->nH > 1)
......@@ -1246,6 +1250,7 @@ void TrackingFilter::process_initialise (UInt_t *error_code)
if(*error_code)
return;
cout << endl;
DefineTriggers(error_code);
if(*error_code)
return;
......@@ -1722,6 +1727,7 @@ void TrackingFilter::InitGenStructures()
gammaE = new Float_t[intmax];
gammaT = new Float_t[intmax];
gammaTstamp = new ULong64_t[intmax];
gammaTrType = new Int_t[intmax];
gammaX1 = new Float_t[intmax];
gammaY1 = new Float_t[intmax];
gammaZ1 = new Float_t[intmax];
......@@ -2069,6 +2075,7 @@ void TrackingFilter::openTTree ()
t->Branch("gammaE", gammaE, "gammaE[number_of_gammas]/F");
t->Branch("gammaT", gammaT, "gammaT[number_of_gammas]/F");
t->Branch("gammaTstamp", gammaTstamp, "gammaTstamp[number_of_gammas]/l");
t->Branch("gammaTrType", gammaTrType, "gammaTrType[number_of_gammas]/I");
t->Branch("gammaX1",gammaX1,"gammaX1[number_of_gammas]/F");
t->Branch("gammaY1",gammaY1,"gammaY1[number_of_gammas]/F");
t->Branch("gammaZ1",gammaZ1,"gammaZ1[number_of_gammas]/F");
......@@ -2116,6 +2123,7 @@ void TrackingFilter::CopyGamma2Tree (trGamma *pg, Int_t number_of_gammas)
gammaE[i] = (Float_t)pg->E;
gammaT[i] = (Float_t)pg->t;
gammaTstamp[i] = pg->tstamp;
gammaTrType[i] = pg->type;
gammaX1[i] = (Float_t)pg->X1;
gammaY1[i] = (Float_t)pg->Y1;
gammaZ1[i] = (Float_t)pg->Z1;
......
......@@ -311,6 +311,7 @@ protected:
Float_t *gammaE;
Float_t *gammaT;
ULong64_t *gammaTstamp;
Int_t *gammaTrType;
Float_t *gammaX1;
Float_t *gammaY1;
Float_t *gammaZ1;
......
......@@ -9,12 +9,12 @@
using namespace std;
using namespace ADF;
#if defined(_MSC_VER) || defined(USING_CMAKE) // *.c stuff compiled using C
#ifdef _MSC_VER // *.c stuff compiled using C
extern "C" {
int mgt_initialize();
void mgt_process_event(MgtStruct *mydata, unsigned int *error_code);
}
#else // *.c stuff compiled using C++
#else // *.c stuff compiled using C++
void mgt_process_event(MgtStruct *mydata, unsigned int *error_code);
int mgt_initialize();
#endif
......@@ -114,7 +114,7 @@ void TrackingFilterMGT::MoveMGTStructures()
else {
pg->X2 = pg->Y2 = pg->Z2 = 0;
}
pg->type = pc->mechanism - 1; // 0 reserved for none
pg->type = pc->mechanism; // 0 reserved for none
pg->t = 0;
pg->tstamp = 0;
if(fVerbose) {
......
......@@ -9,12 +9,12 @@
using namespace std;
using namespace ADF;
#if defined(_MSC_VER) || defined(USING_CMAKE) // *.c stuff compiled using C
#ifdef _MSC_VER // *.c stuff compiled using C
extern "C" {
void process_event(OftStruct *mydata, unsigned int *error_code);
void initialize_oft();
}
#else // *.c stuff compiled using C++
#else // *.c stuff compiled using C++
void process_event(OftStruct *mydata, unsigned int *error_code);
void initialize_oft();
#endif
......@@ -133,7 +133,7 @@ void TrackingFilterOFT::MoveOFTStructures()
pg->Y2 = float(local_ptr->second[nn].y * 10.);
pg->Z2 = float(local_ptr->second[nn].z * 10.);
pg->nH = local_ptr->nbtot[nn];
pg->type = (pg->nH==1) ? 0 : 1;
pg->type = (pg->nH==1) ? 1 : 2;
pg->t = 0;
pg->tstamp = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment