Re: [Brahms-dev-l] how do I get trigger downscale factor?

From: trulsml <trulsml@nbi.dk>
Date: Tue Jul 12 2005 - 04:32:04 EDT
Hi,

the following snippet should do it:

{
  // Get connections to databases
  BrMainDb* mainDb = BrMainDb::Instance();
  mainDb->SetUserName("query");
  mainDb->SetHostName("brahms-db0.rcf.bnl.gov");
  mainDb->SetDbName("BrahmsMain");

  if (!mainDb->Connect())
    return 1;
  if (!mainDb->ConnectToRun())
    return 1;

  BrRunInfoManager* runMan = BrRunInfoManager::Instance();
  for (Int_t run = brun; run <= erun; run++)
    runMan->Register(run);

  runMan->Init();

  for (Int_t run = brun; run <= erun; run++)
    {
      // update runMan
      runMan->Update();
      const BrRunInfo* runInfo = runMan->GetCurrentRun();

      cout << runInfo->GetScale1 << endl;
      cout << runInfo->GetScale2 << endl;
      // etc...
     }
}

Cheers,
	Truls

*---------------------------------*
|http://www.nbi.dk/~trulsml      /
|Truls Martin Larsen            /
|trulsml@nbi.dk                .
|The Niels Bohr Institute     //
|Work Address:               / \0
|Blegdamsvej 17             /\_/
|DK-2100 Copenhagen        /  /
|Tel: +45 35325269        / --
|                        /_/  |
|Home address:          /     \
|Holger Danskes Vej 28H|      '
|DK-2000 Frederiksberg |
|Denmark               |
|Mob: +45 20974802     |
*----------------------*

On Mon, 11 Jul 2005, Stephen J. Sanders wrote:

> Hi: Does someone have, or can point me to, a brat macro where one gets
> a trigger
> downscale factor from the db?
> ..steve
>
>
> _______________________________________________
> Brahms-dev-l mailing list
> Brahms-dev-l@lists.bnl.gov
> http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
>

_______________________________________________
Brahms-dev-l mailing list
Brahms-dev-l@lists.bnl.gov
http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
Received on Tue Jul 12 04:31:37 2005

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2005 - 04:31:48 EDT