daqpp-forum Mailing List for DAQ++
Brought to you by:
lacasta
You can subscribe to this list here.
2007 |
Jan
(9) |
Feb
(9) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Andrej S. <and...@ij...> - 2007-03-27 16:59:49
|
Hi, Carlos! I think I got the path/C-routine right and I created a real bare scan run manager which should do nothing (or crash immediately after initialization, I am not sure which) but should print that it was created= . But I get the following: <here I press Scan button> Current scan is not in the scan list ... this should not happen Current scan is not in the scan list ... this should not happen Creating a new RunManager: Active RMs: 0 ...is current one active ? no rm: 0x95930b0 Deleting current RunManager ...destroying DataRunManager main ...destroying RunManager main MsgManager: removing run manager main need to create a DataRunManager MsgManager: adding run manager main Active RMs: 0 is active ? no Registering to the new RunState Relevant code: ***********constructor**************** ScanRmanager::ScanRmanager(DAQpp::DAQid id) :Rmanager(id),_time(false),ipoint(-1),next_point(0) { std::cout<<"new ScanRmanager id=3D"<<id<<std::endl; } ***************hook******************* extern "C" { ScanRmanager *create_new_manager(){ //const std::string &s, const DAQpp::DAQid &id){ //if (s=3D=3D"ScanRunManager") return new ScanRmanager(DAQpp::DAQid(3001)); } } *****config****************************** <plugins> <plugin name=3D"SIS3300module" module=3D"SIS3300module"> <lib>/home/gamma/vmedaq/vmedaq-0.5.1-1/modules/SIS3300/libSIS3300.s= o</lib> <hook>create_SIS3300moduleConf</hook> </plugin> <plugin name=3D"SecondDetector" module=3D"SecondDetector"> <lib>/home/gamma/vmedaq/vmedaq-0.5.1-1/modules/SIS3300/libSIS3300.s= o</lib> <hook>create_SecondDetectorConf</hook> </plugin> <plugin name=3D"pmtUSB" module=3D"pmtUSB"> <lib>/home/gamma/vmedaq/vmedaq-0.5.1-1/modules/SIS3300/usb/libpmtUS= B.so</lib> <hook>create_pmtUSB</hook> </plugin> <!-- User defined run managers --> <run_managers> <scan> <lib>/home/gamma/vmedaq/vmedaq-0.5.1-1/scan_adacCalibration/libS= canRunManager.so</lib> <hook>create_new_manager</hook> </scan> </run_managers> </plugins> ********************************************** All ideas welcome. -Andrej > Hi andrej, > > >> - related to scan managers relation to data run manager: If the scan r= un >> manager is defined as below, is it created only when Scan is pressed o= n >> the VMEDAQ's front panel or is it the sole run manager and has to mana= ge >> normal data taking as well? >> > > The scan run manager will only be created when scan is enabled in the > scan dialog. Otherwise, you will use whatever you have defined in the > config file for the data run manager (The default is always > DataRunManager) > > >> - is Trigger() routine called at the begining of each event? Can it be >> understood as a StartOfEvent() pair to the EndOfEvent() routine? Shoul= d >> module->Trigger() call Start()? If not, is module->Start() called befo= re >> or after Triggger()? > > Yes, Trigger() is called at the beginning of each event. > Module->Start() is called at the beginning of a run, before calling > RunManager::Trigger(). You should not care about Start(). It will be > called somewhere else. The idea behind Trigger is that the RunManager > can simulate a trigger creation... Of course it can be used for any > other purpose... > > >> >> - does CheckEndOfRun() signal the DAQmanager to stop the run? > > Yes, when it returns true, the run will be stopped. > >> >> - I would make scan manager a child of Rmanager. Does that make sense? >> Am >> I correct in assuming that all data loging will be then handled by >> Rmanager and I should not bother by that? Would then the LogData butto= n >> on >> VMEDAQ's front panel determine whether we log data or not? (ie. pressi= ng >> scan after log data would store events taken during the scan in data >> files >> as given by preferences dialog?) > > I forgot to mention that in vmedaq, the RunManager objects should > derive from Rmanager, like the modules do from GenModule. Rmanager > will take care of most of the things (I hope) > > > To reduce "problems" just clone the current ScanRunManager and remove > references to PulseRunManager... > > Cheers, > > Carlos > > >> >> There might be more questions. Thanks. >> >> -Andrej >> >> >>> Hello Andrej, >>> >>> Yes, you can certainly use the vmedaq scans for that. However, as >>> usual, >>> it will require some work on your side. The idea is that you create a >>> new runmanager and load it with the configuration file (via one of >>> those >>> plugins) to be the one in charge of the scans. Say you create a run >>> manager that lives in the shared library libMyRunManager.so. Then in >>> the >>> config file, in the plugins section you write >>> >>> <plugins> >>> <plugin> ...whatever you might already have.. </plugin> >>> >>> <!-- User defined run managers --> >>> <run_managers> >>> <scan> >>> <lib>path_to_the_lib/libMyRunManager.so</lib> >>> <hook>create_scan_run_manager</hook> >>> </scan> >>> </run_managers> >>> >>> </plugins> >>> >>> That means that in your library there should be a static "C" function >>> called create_scan_run_manager (it can be any valid name for a >>> function) >>> that actually creates the run manager and returns a pointer to it. >>> >>> Now, user defined RunManagers are defined like user defined modules b= ut >>> are much easier, since you do not need to define GUIs, configurations >>> nor anything like that. Take a look at the example in making_a_modul= e. >>> >>> To create your RunManager, I would propose to take ScanRunManager in >>> the >>> daq folder and build from that. You will have to remove its >>> "relationship" with PulseRunManager, since you do not need that, and >>> any >>> call to methods to that class. Yes... I know that should be a "generi= c" >>> class, and I promise I'll try to make it in the next release. >>> >>> How the thing works... All the sugar is in ScanRunManager::Trigger. >>> There it determines if we should start a new point in the scan or not >>> and notifies to the modules. I guess that if you just need to move >>> axes, >>> the modules do not need to be notified, but who knows... This can be >>> done in 2 ways, either change every N events or change every N second= s. >>> Depending on the method, one uses an EventCtr instance or an EventTim= er >>> instance. This is done automatically, so I guess you only need to edi= t >>> the files to remove the dependencies with PulseGenerator and, in >>> Trigger, move your stuff whenever (*next_point)() is true. >>> >>> Hope that helps. >>> >>> Regards, >>> >>> Carlos >>> >>> On Mon, 2007-02-19 at 11:54 -0500, Andrej Studen wrote: >>>> Hi Carlos, everyone! >>>> >>>> I have a question. In what way is it possible to tamper with the sca= n >>>> modality of VMEDAQ? >>>> >>>> Let me illustrate. What I have here is a scintillator camera which >>>> needs >>>> to be recallibrated from time to time. To do that, we use a XY table >>>> and >>>> record N=3D3000 events at a set of different positions (PMT centers, >>>> orthogonal grids, etc.). I am tempted to use VMEdaq to do that. But = my >>>> user supplied scan routine should call external functions (move the >>>> motor, >>>> parse and analyze the data, move to next position) at each position.= I >>>> think it fits nicely into a scan philosophy. So, my question is: can= I >>>> do >>>> that and if I can, what guidelines should I follow. >>>> >>>> A happy monday to everyone >>>> >>>> Andrej >>>> >>>> >>>> --------------------------------------------------------------------= ----- >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>> share >>>> your >>>> opinions on IT & business topics through brief surveys-and earn cash >>>> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&C= ID=3DDEVDEV >>>> _______________________________________________ >>>> Daqpp-forum mailing list >>>> Daq...@li... >>>> https://lists.sourceforge.net/lists/listinfo/daqpp-forum >>> -- >>> ___________________________________________________________________ >>> Carlos Lacasta >>> ^^^^^^^^^^^^^^^ >>> Inst. de Fisica Corpuscular (IFIC) >>> Edificio Institutos de Investigacion >>> P.O. Box 22085 >>> E-46071 VALENCIA >>> Spain >>> Tel.: +34 96 354 3490 >>> Fax.: +34 96 354 3488 >>> Car...@if... >>> ___________________________________________________________________ >>> >>> >> >> >> > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > |
From: Carlos L. <Car...@if...> - 2007-03-26 21:41:03
|
Hi andrej, > - related to scan managers relation to data run manager: If the scan run > manager is defined as below, is it created only when Scan is pressed on > the VMEDAQ's front panel or is it the sole run manager and has to manage > normal data taking as well? > The scan run manager will only be created when scan is enabled in the =20 scan dialog. Otherwise, you will use whatever you have defined in the =20 config file for the data run manager (The default is always =20 DataRunManager) > - is Trigger() routine called at the begining of each event? Can it be > understood as a StartOfEvent() pair to the EndOfEvent() routine? Should > module->Trigger() call Start()? If not, is module->Start() called before > or after Triggger()? Yes, Trigger() is called at the beginning of each event. =20 Module->Start() is called at the beginning of a run, before calling =20 RunManager::Trigger(). You should not care about Start(). It will be =20 called somewhere else. The idea behind Trigger is that the RunManager =20 can simulate a trigger creation... Of course it can be used for any =20 other purpose... > > - does CheckEndOfRun() signal the DAQmanager to stop the run? Yes, when it returns true, the run will be stopped. > > - I would make scan manager a child of Rmanager. Does that make sense? Am > I correct in assuming that all data loging will be then handled by > Rmanager and I should not bother by that? Would then the LogData button on > VMEDAQ's front panel determine whether we log data or not? (ie. pressing > scan after log data would store events taken during the scan in data files > as given by preferences dialog?) I forgot to mention that in vmedaq, the RunManager objects should =20 derive from Rmanager, like the modules do from GenModule. Rmanager =20 will take care of most of the things (I hope) To reduce "problems" just clone the current ScanRunManager and remove =20 references to PulseRunManager... Cheers, Carlos > > There might be more questions. Thanks. > > -Andrej > > >> Hello Andrej, >> >> Yes, you can certainly use the vmedaq scans for that. However, as usual, >> it will require some work on your side. The idea is that you create a >> new runmanager and load it with the configuration file (via one of those >> plugins) to be the one in charge of the scans. Say you create a run >> manager that lives in the shared library libMyRunManager.so. Then in the >> config file, in the plugins section you write >> >> <plugins> >> <plugin> ...whatever you might already have.. </plugin> >> >> <!-- User defined run managers --> >> <run_managers> >> <scan> >> <lib>path_to_the_lib/libMyRunManager.so</lib> >> <hook>create_scan_run_manager</hook> >> </scan> >> </run_managers> >> >> </plugins> >> >> That means that in your library there should be a static "C" function >> called create_scan_run_manager (it can be any valid name for a function) >> that actually creates the run manager and returns a pointer to it. >> >> Now, user defined RunManagers are defined like user defined modules but >> are much easier, since you do not need to define GUIs, configurations >> nor anything like that. Take a look at the example in making_a_module. >> >> To create your RunManager, I would propose to take ScanRunManager in the >> daq folder and build from that. You will have to remove its >> "relationship" with PulseRunManager, since you do not need that, and any >> call to methods to that class. Yes... I know that should be a "generic" >> class, and I promise I'll try to make it in the next release. >> >> How the thing works... All the sugar is in ScanRunManager::Trigger. >> There it determines if we should start a new point in the scan or not >> and notifies to the modules. I guess that if you just need to move axes, >> the modules do not need to be notified, but who knows... This can be >> done in 2 ways, either change every N events or change every N seconds. >> Depending on the method, one uses an EventCtr instance or an EventTimer >> instance. This is done automatically, so I guess you only need to edit >> the files to remove the dependencies with PulseGenerator and, in >> Trigger, move your stuff whenever (*next_point)() is true. >> >> Hope that helps. >> >> Regards, >> >> Carlos >> >> On Mon, 2007-02-19 at 11:54 -0500, Andrej Studen wrote: >>> Hi Carlos, everyone! >>> >>> I have a question. In what way is it possible to tamper with the scan >>> modality of VMEDAQ? >>> >>> Let me illustrate. What I have here is a scintillator camera which needs >>> to be recallibrated from time to time. To do that, we use a XY table and >>> record N=3D3000 events at a set of different positions (PMT centers, >>> orthogonal grids, etc.). I am tempted to use VMEdaq to do that. But my >>> user supplied scan routine should call external functions (move the >>> motor, >>> parse and analyze the data, move to next position) at each position. I >>> think it fits nicely into a scan philosophy. So, my question is: can I >>> do >>> that and if I can, what guidelines should I follow. >>> >>> A happy monday to everyone >>> >>> Andrej >>> >>> >>> ------------------------------------------------------------------------= - >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share >>> your >>> opinions on IT & business topics through brief surveys-and earn cash >>> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV >>> _______________________________________________ >>> Daqpp-forum mailing list >>> Daq...@li... >>> https://lists.sourceforge.net/lists/listinfo/daqpp-forum >> -- >> ___________________________________________________________________ >> Carlos Lacasta >> ^^^^^^^^^^^^^^^ >> Inst. de Fisica Corpuscular (IFIC) >> Edificio Institutos de Investigacion >> P.O. Box 22085 >> E-46071 VALENCIA >> Spain >> Tel.: +34 96 354 3490 >> Fax.: +34 96 354 3488 >> Car...@if... >> ___________________________________________________________________ >> >> > > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Andrej S. <and...@ij...> - 2007-03-26 20:36:41
|
Hi, Carlos! How are you? Came around to making a scan manager. Some questions: - related to scan managers relation to data run manager: If the scan run manager is defined as below, is it created only when Scan is pressed on the VMEDAQ's front panel or is it the sole run manager and has to manage normal data taking as well? - is Trigger() routine called at the begining of each event? Can it be understood as a StartOfEvent() pair to the EndOfEvent() routine? Should module->Trigger() call Start()? If not, is module->Start() called before or after Triggger()? - does CheckEndOfRun() signal the DAQmanager to stop the run? - I would make scan manager a child of Rmanager. Does that make sense? Am I correct in assuming that all data loging will be then handled by Rmanager and I should not bother by that? Would then the LogData button o= n VMEDAQ's front panel determine whether we log data or not? (ie. pressing scan after log data would store events taken during the scan in data file= s as given by preferences dialog?) There might be more questions. Thanks. -Andrej > Hello Andrej, > > Yes, you can certainly use the vmedaq scans for that. However, as usual= , > it will require some work on your side. The idea is that you create a > new runmanager and load it with the configuration file (via one of thos= e > plugins) to be the one in charge of the scans. Say you create a run > manager that lives in the shared library libMyRunManager.so. Then in th= e > config file, in the plugins section you write > > <plugins> > <plugin> ...whatever you might already have.. </plugin> > > <!-- User defined run managers --> > <run_managers> > <scan> > <lib>path_to_the_lib/libMyRunManager.so</lib> > <hook>create_scan_run_manager</hook> > </scan> > </run_managers> > > </plugins> > > That means that in your library there should be a static "C" function > called create_scan_run_manager (it can be any valid name for a function= ) > that actually creates the run manager and returns a pointer to it. > > Now, user defined RunManagers are defined like user defined modules but > are much easier, since you do not need to define GUIs, configurations > nor anything like that. Take a look at the example in making_a_module. > > To create your RunManager, I would propose to take ScanRunManager in th= e > daq folder and build from that. You will have to remove its > "relationship" with PulseRunManager, since you do not need that, and an= y > call to methods to that class. Yes... I know that should be a "generic" > class, and I promise I'll try to make it in the next release. > > How the thing works... All the sugar is in ScanRunManager::Trigger. > There it determines if we should start a new point in the scan or not > and notifies to the modules. I guess that if you just need to move axes= , > the modules do not need to be notified, but who knows... This can be > done in 2 ways, either change every N events or change every N seconds. > Depending on the method, one uses an EventCtr instance or an EventTimer > instance. This is done automatically, so I guess you only need to edit > the files to remove the dependencies with PulseGenerator and, in > Trigger, move your stuff whenever (*next_point)() is true. > > Hope that helps. > > Regards, > > Carlos > > On Mon, 2007-02-19 at 11:54 -0500, Andrej Studen wrote: >> Hi Carlos, everyone! >> >> I have a question. In what way is it possible to tamper with the scan >> modality of VMEDAQ? >> >> Let me illustrate. What I have here is a scintillator camera which nee= ds >> to be recallibrated from time to time. To do that, we use a XY table a= nd >> record N=3D3000 events at a set of different positions (PMT centers, >> orthogonal grids, etc.). I am tempted to use VMEdaq to do that. But my >> user supplied scan routine should call external functions (move the >> motor, >> parse and analyze the data, move to next position) at each position. I >> think it fits nicely into a scan philosophy. So, my question is: can I >> do >> that and if I can, what guidelines should I follow. >> >> A happy monday to everyone >> >> Andrej >> >> >> ----------------------------------------------------------------------= --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to shar= e >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV >> _______________________________________________ >> Daqpp-forum mailing list >> Daq...@li... >> https://lists.sourceforge.net/lists/listinfo/daqpp-forum > -- > ___________________________________________________________________ > Carlos Lacasta > ^^^^^^^^^^^^^^^ > Inst. de Fisica Corpuscular (IFIC) > Edificio Institutos de Investigacion > P.O. Box 22085 > E-46071 VALENCIA > Spain > Tel.: +34 96 354 3490 > Fax.: +34 96 354 3488 > Car...@if... > ___________________________________________________________________ > > |
From: Matej <mat...@ij...> - 2007-03-02 07:55:34
|
Hi all! I have noticed that InitVME.cc (copy of Andrej's) has error in the OPTOLINK part. The call write16 void VXImanager::write16(unsigned long add, unsigned short val) { int rc; MTX_ACQ(); rc = vme_A24D32_write(fd, add, val ); check_rc(rc); MTX_REL(); } should instead of rc = vme_A24D32_write(fd, add, val ); have rc = vme_A24D16_write(fd, add, val ); Cheers, Matej |
From: Carlos L. <Car...@if...> - 2007-02-20 17:11:04
|
Hello Matej, Sorry for that couple of days lost... InitVME disappeared in the last cvs release and I believe I said something about that at least in the ChangeLog... But it may have happened that I discussed that before using the mail list or that the ChangeLog is too cryptic... Now you have to explicitly mention your VME manager in the configuration file. If you are using the SIS1100 stuff, you need something like <daq> ... anything you already have ... <vme_driver> <lib>libSISmanager.so</lib> <hook>create_sis_manager</hook> </vme_driver> </daq> in the <general> ... </general> section. Otherwise you will load the "default", which means that the modules "simulate" their data... Concerning tstlib.cc, I'll fix that. Thanks for spotting it. REgards, Carlos On Tue, 2007-02-20 at 11:22 +0100, Matej Batič wrote: > Hi! > > I would like to point out that sourceforge cvs version does not include (some > sort of) InitVME. This in my case meant that vmedaq seemed to work and I have > spent couple of days hitting the wall not knowing what is wrong with > pedestals (I only performed pedestal run that returned saw-like dependency) > > Next thing concerns tstlib.cc, which does not work unless one uses > void onNewData(const Module *, int evtcnt, const ChannelList &) > instead of > void onNewData(const Module *, int evtcnt, const std::vector<Channel *> &) > Don't get me wrong, it compiles but there is hSig is empty since the method > onNewData is not correctly overloaded. > > Hopefully might help someone :) > > Best etc, > > Matej > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum -- ___________________________________________________________________ Carlos Lacasta ^^^^^^^^^^^^^^^ Inst. de Fisica Corpuscular (IFIC) Edificio Institutos de Investigacion P.O. Box 22085 E-46071 VALENCIA Spain Tel.: +34 96 354 3490 Fax.: +34 96 354 3488 Car...@if... ___________________________________________________________________ |
From: Carlos L. <Car...@if...> - 2007-02-20 17:03:43
|
Hello Andrej, Yes, you can certainly use the vmedaq scans for that. However, as usual, it will require some work on your side. The idea is that you create a new runmanager and load it with the configuration file (via one of those plugins) to be the one in charge of the scans. Say you create a run manager that lives in the shared library libMyRunManager.so. Then in the config file, in the plugins section you write <plugins> <plugin> ...whatever you might already have.. </plugin> <!-- User defined run managers --> <run_managers> <scan> <lib>path_to_the_lib/libMyRunManager.so</lib> <hook>create_scan_run_manager</hook> </scan> </run_managers> </plugins> That means that in your library there should be a static "C" function called create_scan_run_manager (it can be any valid name for a function) that actually creates the run manager and returns a pointer to it. Now, user defined RunManagers are defined like user defined modules but are much easier, since you do not need to define GUIs, configurations nor anything like that. Take a look at the example in making_a_module. To create your RunManager, I would propose to take ScanRunManager in the daq folder and build from that. You will have to remove its "relationship" with PulseRunManager, since you do not need that, and any call to methods to that class. Yes... I know that should be a "generic" class, and I promise I'll try to make it in the next release. How the thing works... All the sugar is in ScanRunManager::Trigger. There it determines if we should start a new point in the scan or not and notifies to the modules. I guess that if you just need to move axes, the modules do not need to be notified, but who knows... This can be done in 2 ways, either change every N events or change every N seconds. Depending on the method, one uses an EventCtr instance or an EventTimer instance. This is done automatically, so I guess you only need to edit the files to remove the dependencies with PulseGenerator and, in Trigger, move your stuff whenever (*next_point)() is true. Hope that helps. Regards, Carlos On Mon, 2007-02-19 at 11:54 -0500, Andrej Studen wrote: > Hi Carlos, everyone! > > I have a question. In what way is it possible to tamper with the scan > modality of VMEDAQ? > > Let me illustrate. What I have here is a scintillator camera which needs > to be recallibrated from time to time. To do that, we use a XY table and > record N=3000 events at a set of different positions (PMT centers, > orthogonal grids, etc.). I am tempted to use VMEdaq to do that. But my > user supplied scan routine should call external functions (move the motor, > parse and analyze the data, move to next position) at each position. I > think it fits nicely into a scan philosophy. So, my question is: can I do > that and if I can, what guidelines should I follow. > > A happy monday to everyone > > Andrej > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum -- ___________________________________________________________________ Carlos Lacasta ^^^^^^^^^^^^^^^ Inst. de Fisica Corpuscular (IFIC) Edificio Institutos de Investigacion P.O. Box 22085 E-46071 VALENCIA Spain Tel.: +34 96 354 3490 Fax.: +34 96 354 3488 Car...@if... ___________________________________________________________________ |
From: Matej <mat...@ij...> - 2007-02-20 10:22:19
|
Hi! I would like to point out that sourceforge cvs version does not include (some sort of) InitVME. This in my case meant that vmedaq seemed to work and I have spent couple of days hitting the wall not knowing what is wrong with pedestals (I only performed pedestal run that returned saw-like dependency) Next thing concerns tstlib.cc, which does not work unless one uses void onNewData(const Module *, int evtcnt, const ChannelList &) instead of void onNewData(const Module *, int evtcnt, const std::vector<Channel *> &) Don't get me wrong, it compiles but there is hSig is empty since the method onNewData is not correctly overloaded. Hopefully might help someone :) Best etc, Matej |
From: Andrej S. <and...@ij...> - 2007-02-19 16:54:15
|
Hi Carlos, everyone! I have a question. In what way is it possible to tamper with the scan modality of VMEDAQ? Let me illustrate. What I have here is a scintillator camera which needs to be recallibrated from time to time. To do that, we use a XY table and record N=3D3000 events at a set of different positions (PMT centers, orthogonal grids, etc.). I am tempted to use VMEdaq to do that. But my user supplied scan routine should call external functions (move the motor= , parse and analyze the data, move to next position) at each position. I think it fits nicely into a scan philosophy. So, my question is: can I do that and if I can, what guidelines should I follow. A happy monday to everyone Andrej |
From: Carlos L. <Car...@if...> - 2007-02-16 06:22:11
|
Hi Matej, Thanks for spottig that. I'll fix that. REgards, CArlos On Mon, 2007-02-12 at 15:22 +0100, Matej Batič wrote: > I have just realised that the problem lies in using unsigned long when > writing/reading data. On 32bit sizeof(int)=sizeof(unsigned > int)=sizeof(long)=sizeof(unsigned long) whereas on 64 bit > sizeof(int)=sizeof(unsigned int) but sizeof(unsigned long) is twice the > sizeof(unsigned int). > > Would find/replace script converting "unsigned long" to "unsigned int" on > vmedaq/ folder (recursively) solve the problem? > > Best, etc > Matej > > > On Monday 12 February 2007 09:10:24 Matej Batič wrote: > > I have tried to compile vmedaq on 64bit machine and it fails... > > > > The problem lies in (output from make command) > > > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/gui' > > RunMenu.cc: In function ‘gboolean do_send_command(Runmenu*)’: > > RunMenu.cc:32: error: cast from ‘void*’ to ‘int’ loses precision > > > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/modules' > > MyModuleGuiConfig.cc: In static member function 'static void > > MyModuleGuiConfig::onBtnToggled(GtkWidget*, MyModuleGuiConfig*)': > > MyModuleGuiConfig.cc:269: error: cast from 'void*' to 'int' loses precision > > MyModuleGuiConfig.cc:270: error: cast from 'void*' to 'int' loses precision > > MyModuleGuiConfig.cc: In static member function 'static void > > MyModuleGuiConfig::onTxtChanged(GtkWidget*, MyModuleGuiConfig*)': > > MyModuleGuiConfig.cc:345: error: cast from 'void*' to 'int' loses precision > > > > > > These errors are solved with casting to long instead of int: > > //mat...@ij... > > //int thing = (int)ptr_to_sth; > > long thing = (long)ptr_to_sth; > > > > So, compiled code seems to work somehow. But simple observer class with > > only DataRecord implemented, where some variable is increased on each new > > data record (so data counting observer) tells me that there are exactly > > 5000 data records in the file with 10000 data records. The is to be > > expected, since on 32bit machine: > > size of int = 4 > > size of long = 4 > > > > but on 64bit: > > size of int = 4 > > size of long = 8 > > > > I expect that everything would work if the data were taken on 64bit machine > > and then analyzed on 64bit as well, but I have 32bit machine in my setup, > > but I would like to use (brand new and very fast :-) ) 4-processor 64bit > > computer for analysis. I also would not like to use 32bit precompiled > > binaries on 64bit, since I use shared libraries (ROOT mostly). > > > > So, any suggestion will be highly appreciated and forever praised :-) > > > > Best, etc, > > Matej > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Daqpp-forum mailing list > > Daq...@li... > > https://lists.sourceforge.net/lists/listinfo/daqpp-forum > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum -- ___________________________________________________________________ Carlos Lacasta ^^^^^^^^^^^^^^^ Inst. de Fisica Corpuscular (IFIC) Edificio Institutos de Investigacion P.O. Box 22085 E-46071 VALENCIA Spain Tel.: +34 96 354 3490 Fax.: +34 96 354 3488 Car...@if... ___________________________________________________________________ |
From: Matej <mat...@ij...> - 2007-02-12 14:23:28
|
I have just realised that the problem lies in using unsigned long when=20 writing/reading data. On 32bit sizeof(int)=3Dsizeof(unsigned=20 int)=3Dsizeof(long)=3Dsizeof(unsigned long) whereas on 64 bit=20 sizeof(int)=3Dsizeof(unsigned int) but sizeof(unsigned long) is twice the=20 sizeof(unsigned int). Would find/replace script converting "unsigned long" to "unsigned int" on=20 vmedaq/ folder (recursively) solve the problem? Best, etc Matej On Monday 12 February 2007 09:10:24 Matej Bati=C4=8D wrote: > I have tried to compile vmedaq on 64bit machine and it fails... > > The problem lies in (output from make command) > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/gui' > RunMenu.cc: In function =E2=80=98gboolean do_send_command(Runmenu*)=E2=80= =99: > RunMenu.cc:32: error: cast from =E2=80=98void*=E2=80=99 to =E2=80=98int= =E2=80=99 loses precision > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/modules' > MyModuleGuiConfig.cc: In static member function 'static void > MyModuleGuiConfig::onBtnToggled(GtkWidget*, MyModuleGuiConfig*)': > MyModuleGuiConfig.cc:269: error: cast from 'void*' to 'int' loses precisi= on > MyModuleGuiConfig.cc:270: error: cast from 'void*' to 'int' loses precisi= on > MyModuleGuiConfig.cc: In static member function 'static void > MyModuleGuiConfig::onTxtChanged(GtkWidget*, MyModuleGuiConfig*)': > MyModuleGuiConfig.cc:345: error: cast from 'void*' to 'int' loses precisi= on > > > These errors are solved with casting to long instead of int: > //mat...@ij... > //int thing =3D (int)ptr_to_sth; > long thing =3D (long)ptr_to_sth; > > So, compiled code seems to work somehow. But simple observer class with > only DataRecord implemented, where some variable is increased on each new > data record (so data counting observer) tells me that there are exactly > 5000 data records in the file with 10000 data records. The is to be > expected, since on 32bit machine: > size of int =3D 4 > size of long =3D 4 > > but on 64bit: > size of int =3D 4 > size of long =3D 8 > > I expect that everything would work if the data were taken on 64bit machi= ne > and then analyzed on 64bit as well, but I have 32bit machine in my setup, > but I would like to use (brand new and very fast :-) ) 4-processor 64bit > computer for analysis. I also would not like to use 32bit precompiled > binaries on 64bit, since I use shared libraries (ROOT mostly). > > So, any suggestion will be highly appreciated and forever praised :-) > > Best, etc, > Matej > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum |
From: Matej <mat...@ij...> - 2007-02-12 08:10:34
|
I have tried to compile vmedaq on 64bit machine and it fails... The problem lies in (output from make command) make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/gui' RunMenu.cc: In function =E2=80=98gboolean do_send_command(Runmenu*)=E2=80= =99: RunMenu.cc:32: error: cast from =E2=80=98void*=E2=80=99 to =E2=80=98int=E2= =80=99 loses precision make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/modules' MyModuleGuiConfig.cc: In static member function 'static void=20 MyModuleGuiConfig::onBtnToggled(GtkWidget*, MyModuleGuiConfig*)': MyModuleGuiConfig.cc:269: error: cast from 'void*' to 'int' loses precision MyModuleGuiConfig.cc:270: error: cast from 'void*' to 'int' loses precision MyModuleGuiConfig.cc: In static member function 'static void=20 MyModuleGuiConfig::onTxtChanged(GtkWidget*, MyModuleGuiConfig*)': MyModuleGuiConfig.cc:345: error: cast from 'void*' to 'int' loses precision These errors are solved with casting to long instead of int: //mat...@ij... //int thing =3D (int)ptr_to_sth; long thing =3D (long)ptr_to_sth; So, compiled code seems to work somehow. But simple observer class with onl= y=20 DataRecord implemented, where some variable is increased on each new data=20 record (so data counting observer) tells me that there are exactly 5000 dat= a=20 records in the file with 10000 data records. The is to be expected, since o= n=20 32bit machine: size of int =3D 4 size of long =3D 4 but on 64bit: size of int =3D 4 size of long =3D 8 I expect that everything would work if the data were taken on 64bit machine= =20 and then analyzed on 64bit as well, but I have 32bit machine in my setup, b= ut=20 I would like to use (brand new and very fast :-) ) 4-processor 64bit comput= er=20 for analysis. I also would not like to use 32bit precompiled binaries on=20 64bit, since I use shared libraries (ROOT mostly).=20 So, any suggestion will be highly appreciated and forever praised :-) Best, etc, Matej |
From: Andrej S. <and...@ij...> - 2007-02-02 14:00:27
|
About the DataRecord -> there is a patch now that both 0xa000 and 0x8000 are considered BigDataRecord (I think that BigDataRecord gets stamped als= o as a data record hence being 0x8000 | 0x2000 =3D 0xa0000). Is that what w= e want? Andrej > Mmmm, yes, you are right. I'll fix it here as well... Do we still need > to check what you mentioned on your previous mail about the DAtaRecord = ? > > Carlos > > On Wed, 2007-01-31 at 16:59 -0500, Andrej Studen wrote: >> Selection criteria for observers (in vmedaq.cc, line 128, marked below= ) >> is >> leaking. Most notably: >> >> 0xb0000 [SecDetData] & 0x10000 [NormalData] =3D=3D 0x10000 [NormalData= ] >> ( b=3D[1011] 1=3D[0001] ) >> >> and handler for SecDetData gets called on NormalData. I know that the >> obvious criteria ip->second =3D=3D data_type was replaced to allow for >> general >> purpose observers (with ip->second=3D0xffffffff). I suggest an or: >> >> if (ip->second =3D=3D data_type || ip->second =3D=3D 0xffffffff) >> >> Will correct here. >> >> Cheers >> >> Andrej >> >> Attached - pieces of code that should show the error: >> >> vmedaq.cc[121-139]: >> case DataRecord: >> evt_num =3D data[1] & 0xffffff; >> if ( _last_event !=3D evt_num ) { >> NewEvent(evt_num); >> _last_event =3D evt_num; >> } >> for (ip=3Dobservers.begin();ip!=3Dobservers.end();++ip) { >> --> if ( (ip->second & data_type) =3D=3D data_type) { >> if (evt_num !=3D ip->first->last_event()) >> { >> if (ip->first->last_event()>=3D0) >> ip->first->onEndOfEvent(ip->first->last_event(), >> ip->first->module(id)); >> ip->first->last_event( evt_num ); >> } >> ip->first->DataRecord(data); >> } >> } >> break; >> >> DataFormat.h[171-180]: >> enum DataType { >> NormalData =3D 0x10000, >> PulseData =3D 0x20000, >> ScanData =3D 0x30000, >> ADCdata =3D 0x40000, >> CSPRINTdata =3D 0x80000, >> FBTDCdata =3D 0x90000, >> SIS3300data =3D 0xa0000, >> SecDetData =3D 0xb0000 >> }; >> >> >> ----------------------------------------------------------------------= --- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier. >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&da= t=3D121642 >> _______________________________________________ >> Daqpp-forum mailing list >> Daq...@li... >> https://lists.sourceforge.net/lists/listinfo/daqpp-forum > -- > ___________________________________________________________________ > Carlos Lacasta > ^^^^^^^^^^^^^^^ > Inst. de Fisica Corpuscular (IFIC) > Edificio Institutos de Investigacion > P.O. Box 22085 > E-46071 VALENCIA > Spain > Tel.: +34 96 354 3490 > Fax.: +34 96 354 3488 > Car...@if... > ___________________________________________________________________ > > |
From: Carlos L. <Car...@if...> - 2007-02-02 07:05:33
|
Mmmm, yes, you are right. I'll fix it here as well... Do we still need to check what you mentioned on your previous mail about the DAtaRecord ? Carlos On Wed, 2007-01-31 at 16:59 -0500, Andrej Studen wrote: > Selection criteria for observers (in vmedaq.cc, line 128, marked below) is > leaking. Most notably: > > 0xb0000 [SecDetData] & 0x10000 [NormalData] == 0x10000 [NormalData] > ( b=[1011] 1=[0001] ) > > and handler for SecDetData gets called on NormalData. I know that the > obvious criteria ip->second == data_type was replaced to allow for general > purpose observers (with ip->second=0xffffffff). I suggest an or: > > if (ip->second == data_type || ip->second == 0xffffffff) > > Will correct here. > > Cheers > > Andrej > > Attached - pieces of code that should show the error: > > vmedaq.cc[121-139]: > case DataRecord: > evt_num = data[1] & 0xffffff; > if ( _last_event != evt_num ) { > NewEvent(evt_num); > _last_event = evt_num; > } > for (ip=observers.begin();ip!=observers.end();++ip) { > --> if ( (ip->second & data_type) == data_type) { > if (evt_num != ip->first->last_event()) > { > if (ip->first->last_event()>=0) > ip->first->onEndOfEvent(ip->first->last_event(), > ip->first->module(id)); > ip->first->last_event( evt_num ); > } > ip->first->DataRecord(data); > } > } > break; > > DataFormat.h[171-180]: > enum DataType { > NormalData = 0x10000, > PulseData = 0x20000, > ScanData = 0x30000, > ADCdata = 0x40000, > CSPRINTdata = 0x80000, > FBTDCdata = 0x90000, > SIS3300data = 0xa0000, > SecDetData = 0xb0000 > }; > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum -- ___________________________________________________________________ Carlos Lacasta ^^^^^^^^^^^^^^^ Inst. de Fisica Corpuscular (IFIC) Edificio Institutos de Investigacion P.O. Box 22085 E-46071 VALENCIA Spain Tel.: +34 96 354 3490 Fax.: +34 96 354 3488 Car...@if... ___________________________________________________________________ |
From: Andrej S. <and...@ij...> - 2007-01-31 22:02:24
|
Selection criteria for observers (in vmedaq.cc, line 128, marked below) i= s leaking. Most notably: 0xb0000 [SecDetData] & 0x10000 [NormalData] =3D=3D 0x10000 [NormalData] ( b=3D[1011] 1=3D[0001] ) and handler for SecDetData gets called on NormalData. I know that the obvious criteria ip->second =3D=3D data_type was replaced to allow for ge= neral purpose observers (with ip->second=3D0xffffffff). I suggest an or: if (ip->second =3D=3D data_type || ip->second =3D=3D 0xffffffff) Will correct here. Cheers Andrej Attached - pieces of code that should show the error: vmedaq.cc[121-139]: case DataRecord: evt_num =3D data[1] & 0xffffff; if ( _last_event !=3D evt_num ) { NewEvent(evt_num); _last_event =3D evt_num; } for (ip=3Dobservers.begin();ip!=3Dobservers.end();++ip) { --> if ( (ip->second & data_type) =3D=3D data_type) { if (evt_num !=3D ip->first->last_event()) { if (ip->first->last_event()>=3D0) ip->first->onEndOfEvent(ip->first->last_event(), ip->first->module(id)); ip->first->last_event( evt_num ); } ip->first->DataRecord(data); } } break; DataFormat.h[171-180]: enum DataType { NormalData =3D 0x10000, PulseData =3D 0x20000, ScanData =3D 0x30000, ADCdata =3D 0x40000, CSPRINTdata =3D 0x80000, FBTDCdata =3D 0x90000, SIS3300data =3D 0xa0000, SecDetData =3D 0xb0000 }; |
From: Andrej S. <and...@ij...> - 2007-01-31 16:08:21
|
A DataRecord issue. Look at the original message below and here is Eric's reply. ---------------------------- Original Message ---------------------------= - Subject: Re: progress update From: "Eric Cochran" <coc...@os...> Date: Wed, January 31, 2007 10:41 To: and...@ij... -------------------------------------------------------------------------= - Andrej, Yes, I remember this now, I don't think it was ever resolved. I verified that the correct value of BigDataRecord is used in SecondDetector.cc when the data is passed on in the getData method, but somehow a value 2 greate= r than whatever I set BigDataRecord to gets written to the file. I believe = I asked Carlos about this but don't think I ever got a response. I will loo= k into it again, maybe I know a little more about vmedaq now, but we should probably ask Carlos about it as well to try to clear it up as soon as possible. As a temporary fix, I recall that I made a separate DataFormat.h file for the offline analysis in which I changed the BigDataRecord value to an "a"= or whatever actually got written to the file. -Eric On 1/30/07, Andrej Studen <and...@ij...> wrote: > > Hey Eric! > > I was trying to look at files that we collected last week. Although I w= as > only looking for silicon records the program was crashing. I went in wi= th > a debugger and found that data started with spurious record (here is th= e > pipe out): > > Breakpoint 2, VMEdaq::read (this=3D0xbfe93090) at vmedaq.cc:77 > 77 if (IsBigDataRecord(x)) { > (gdb) print /x x > $10 =3D 0xcafea000 > > Big record should be 0xcafe8000 right? > > (DataFormat.h here reads : > > const unsigned long DataHeader =3D 0xcafe0000; > enum EventType { > StartOfRunRecord =3D 0x1000, > DataRecord =3D 0x2000, > EndOfRunRecord =3D 0x3000, > PedestalRecord =3D 0x4000, > NewPointRecord =3D 0x5000, > MapRecord =3D 0x6000, > ScanRecord =3D 0x7000, > BigDataRecord =3D 0x8000, > }; > > ) > > Is it a coincidence that SIS3300data DataType has an a in it? > > enum DataType { > NormalData =3D 0x10000, > PulseData =3D 0x20000, > ScanData =3D 0x30000, > ADCdata =3D 0x40000, > CSPRINTdata =3D 0x80000, > FBTDCdata =3D 0x90000, > SIS3300data =3D 0xa0000, > SecDetData =3D 0xb0000 > }; > > I guess it crashes because 0xcafea000 is treated as ordinary record wit= h a > size of 0 and then a gzread with a size of -4bytes (ie. one unsigned lo= ng) > is attempted. > > How do we wiggle our way out of this one? > > Andrej > > > > |
From: Carlos L. <Car...@if...> - 2007-01-27 20:16:28
|
Dear all, I have committed all the changes to the repository. You should find there a copy of latest snapshot of vmedaq. Please check that you use :ext:use...@da...:/cvsroot/daqpp/vmedaq as the repository changing username by your alias in sourceforge. Regards, Carlos ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Andrej S. <and...@ij...> - 2007-01-27 16:25:44
|
Hi, Carlos! Great to see you working on a weekend... Registered as astuden. I see that Klaus is also on the team. Great. I think the data format was quite good except for the data length caveat an= d probably a bit more space to write extra data (nchips/nchannels/chip type for Si, npmts/nsamples for sis3300, etc.). I'll patch vmedaq here. Andrej > Mmmm, that reminds me that when Eric talked to me about that I thought > we better sit together and think on a sensible data format. We can > proceed by now patching the existing code everytime we need something > else but then it becomes quite difficult to mantain. Then comes the > issue of backwards compatibility... Ufff. > > In any case, we can use the CVS repository in sourceforge. Register as > a sourceforge user and let me know you alias. I will then include you > as a daqpp developper. Eric is already part of the team. > > Carlos > > > Quoting Andrej Studen <and...@ij...>: > >> We talked with Eric about the following: >> >> There is another Record when SecondDetector is used, namely >> BigDataRecord, >> which is not flagged in VMEdaqObserver. We should probably include tha= t. >> I >> can do that here in a new vmedaq.cc - where should I put it afterwards= ? >> >> Andrej >> >> >> ----------------------------------------------------------------------= --- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to shar= e >> your >> opinions on IT & business topics through brief surveys - and earn cash >> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV >> _______________________________________________ >> Daqpp-forum mailing list >> Daq...@li... >> https://lists.sourceforge.net/lists/listinfo/daqpp-forum >> > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > |
From: Carlos L. <Car...@if...> - 2007-01-27 02:00:42
|
Mmmm, that reminds me that when Eric talked to me about that I thought =20 we better sit together and think on a sensible data format. We can =20 proceed by now patching the existing code everytime we need something =20 else but then it becomes quite difficult to mantain. Then comes the =20 issue of backwards compatibility... Ufff. In any case, we can use the CVS repository in sourceforge. Register as =20 a sourceforge user and let me know you alias. I will then include you =20 as a daqpp developper. Eric is already part of the team. Carlos Quoting Andrej Studen <and...@ij...>: > We talked with Eric about the following: > > There is another Record when SecondDetector is used, namely BigDataRecord, > which is not flagged in VMEdaqObserver. We should probably include that. I > can do that here in a new vmedaq.cc - where should I put it afterwards? > > Andrej > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share yo= ur > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DD= EVDEV > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Andrej S. <and...@ij...> - 2007-01-26 20:12:28
|
We talked with Eric about the following: There is another Record when SecondDetector is used, namely BigDataRecord= , which is not flagged in VMEdaqObserver. We should probably include that. = I can do that here in a new vmedaq.cc - where should I put it afterwards? Andrej |